xantfarm on the root window

Toby Kelsey toby_kelsey at ntlworld.com
Tue Aug 30 19:38:58 UTC 2005


xantfarm is a simple but fun amusement (the source can be found with google and is easily compiled).
However there is a problem running it in Ubuntu.  If you try to run a program on the root window 
like xantfarm or xfishtank or xsetroot, they appear not to work (just have no effect) because the 
desktop wallpaper is controlled by nautilus.

I have found two ways of getting xantfarm to work:

(a) As a screensaver: put the executable in /usr/local/bin, add a line to $HOME/.xscreensaver like 
this:

  "AntFarm (30 ants)"  /usr/local/bin/xantfarm -num 30 -c 40 $HOME/.xantfarm-save \n\

and run xantfarm as a preview from xscreensaver-demo (or use it as your main screensaver), or

(b) Disable the desktop: run gconf-editor and uncheck apps > nautilus > preferences > show_desktop, 
this will turn off whatever background image/colour you have (and root menus) and make the root 
window useable.  Now run xantfarm as a normal background process.  If you stop it you will be left 
with the last image it produced.

My question is, can you (in a script or programmatically) enable xantfarm or xfishtank to run in the 
root window such that when they are stopped the usual/previous wallpaper or background is restored, 
without having to repeatedly use gconf-editor?

Toby




More information about the ubuntu-users mailing list