Wanna be 1337? Read Penguin Pete!

Five X Windows Background Hacks You Probably Didn't Know

Date/Time Permalink: 02/10/07 02:05:30 am
Category: HOWTOs and Guides

Every now and then I stumble upon a nifty little desktop background hack, and after noting them down for a few months, discovered I had enough to make a blog post.

All of these will be variably available here and there on POSIX Unix-like systems. But some distros may not include any of them! The solid color declarations come from a file most X windows setups should have, rgb.txt, which should be in /usr/X11R6/lib/X11/. Have a cat through it to see what declared colors you can use.

To start with the easiest. This is part of the Fluxbox system, and is mostly an interpretation of xsetroot. This program adds the gradient function.

background image screenshot

fbsetroot -solid gray40

Will set a neutral shade of solid gray.

background image screenshot

fbsetroot -mod 12 12 -bg black -fg green4

This will make a tight boxed pattern of black and green.

background image screenshot

fbsetroot -gradient pipecross -from black -to blue

This is an example of the gradient. If fbsetroot is on your system, then "man fbsetroot" will show all the gradient arguments.

This is part of the "xv" program, the really funky old shareware graphics program by John Bradley, last heard from in 1994. It's still hanging around on some Linux systems.

background image screenshot

bggen 0 0 0 255 255 255 | xv -root -quit -

A simple gradient.

background image screenshot

bggen black darkred black -h 128 -w 128 -r 45 | xv -root -quit -

A wild gradient square pattern.

background image screenshot

bggen black gray -r 45 -g 64x64 | xv -root -quit -rmode 3 -

A diamond pattern.

background image screenshot

bggen black red yellow green blue purple black | xv -root -quit -

A full-spectrum rainbow!

Image Magick is a full suite of programs all by itself. Practically guaranteed to be on most distros. There is enough to it to fill a manual on its own, but here is one example:

background image screenshot

convert -size 230x100 xc:black -fill white -pointsize 72 \
-draw "text 25,75 'Linux'" -shade 120x45 im_text.png \
&& display -window root im_text.png

This will create a simple Linux logo and tile it, with a file saved as "im_text.png" in the current directory.

An animated desktop! This is the fractal-generating program. It's a toss-up whether you have it or not.

background image screenshot

xaos -root -loadexample -autopilot

Will load a random xaos configuration file from /usr/local/share/XaoS/examples/, then zoom and pan around in it on autopilot. All desktop functions work normally, just with a moving background! Of course, if you pick up the xaos mini-language, you can create whole demos this way.

More animated desktops! Still hanging around on most systems, this is the simpler precursor to xscreensaver. It also sometimes goes by the name of "xlockmore". There is a multitude of screen hacks that come with it, see "man xlock" for more.

background image screenshot

xlock -nolock -mode matrix -inroot

The Matrix!

background image screenshot

xlock -nolock -mode deco -count 10 -inroot

Hideous rectangles.

background image screenshot

xlock -nolock -mode clock -inroot

An animated, analog clock.

background image screenshot

xlock -nolock -mode tetris -size 40 -inroot

The desktop plays Tetris with itself, and loses a lot.

Lacking that, xscreensaver itself can be run in the root window. Just go to a console and do a "ls /usr/libexec/xscreensaver/" and there are all the screen hacks! Run any one in your root with the -root parameter.

background image screenshot

/usr/libexec/xscreensaver/kumppa -root

will run 'kumppa' in your background until you kill it with Ctrl-C.

Silly Warning

UPDATE: GeekHacks also tells you how to set a specific example of the GLMatrix screensaver, and have it launch automatically when you log in.

UPDATE 9/14/07: Well, now that it's all over StumbleUpon, I'll add screenshots!

Follow me on Twitter for an update every time this blog gets a post.
Stumble it Reddit this share on Facebook

suddenly the moon