xantfarm on the root window

Toby Kelsey toby_kelsey at ntlworld.com
Thu Sep 1 13:29:53 UTC 2005


Mike Ginou wrote:

> Google tells me that there is a gconf command line tool, so a bash 
> script should be able to do what you want without too much difficulty. I 
> have never used the tool, gconftool-2, nor read the man page, so I can't 
> really help you out with the syntax.
> 
> This link shows you how it's done though:
> http://www.gnome.org/learn/admin-guide/latest/ch01s04.html

Thanks Mike, that did the trick.

I found that after using gconftool-2 I have to restart nautilus.  Here's the script if anyone's 
interested.

--- snip ---
#! /bin/bash
#
# script to start/stop xantfarm and pass root window control to/from nautilus
#
case $1 in
   start)
     gconftool-2 --set /apps/nautilus/preferences/show_desktop -t bool "false"
     /usr/local/bin/xantfarm -ant darkgreen -sand brown -num 30 -c 50 ~/.xantfarm-save &
     ;;
   stop)
     killall xantfarm
     gconftool-2 --set /apps/nautilus/preferences/show_desktop -t bool "true"
     # restart nautilus if necessary
     x="`ps -u $USER`"
     echo "$x" | grep -q nautilus || { echo Starting nautilus; nautilus --no-default-window & }
     ;;
   *)
     echo ; echo "  Usage: $0 start|stop"; echo
     ;;
esac
--- snip ---

Toby




More information about the ubuntu-users mailing list