Friday, April 14, 2006

 

Microhack: XScreensaver as root

Not all hacks are life-changing applications. Sometimes the best hacks are those that are two lines long. Or, at least, it's something you've never considered before. That's why I will sometimes post microhacks - short, to the point, tweaks that give a nice result.

Screensaver on X11 Root

This isn't a big deal - it's built into the xscreensaver package. All you have to do is add it into the X11 initialization scripts to run instead of a given background. In this example, if it matters, we're using fluxbox on Gentoo. If you're using a window manager that provides icons on the root window this may not work since the window manager is already overlaying the root window with it's own graphics.

xscreensaver package

xscreensaver is a collection of screensavers for X11. A neat feature that most people ignore is that you can run them on the root window (the background of your desktop). Just, once the package is installed, run them with the argument '-root'. For example, if the package binaries reside in /usr/lib/misc/xscreensaver, then run:



/usr/lib/misc/xscreensaver/anemone -root


Running on Startup

Users running fluxbox most likely have a ~/.fluxbox directory that stores their user preferences. Open the file "startup" that exists in that directory - it is a script that is run during fluxbox's initialization.

The first thing we need to do is to turn off our current wallpaper. If the script has any calls to Esetroot, or fbsetbg, or similiar, comment them out. You may also need to open your style config file (often found in /usr/share/fluxbox or /usr/share/commonbox) and comment out the call to fbsetbg or similiar.

As a final step, add the line below to the startup file:



/path/to/screensaver -root &



Restart and we're done!

Comments: Post a Comment




<< Home

This page is powered by Blogger. Isn't yours?