[ubuntu-uk] gnome desktop background changer

Jacob Mansfield cyberjacob at gmail.com
Sat Oct 16 10:01:30 BST 2010


I am attempting to make the desktop background in gnome change automatically
to a random image from a set folder. I know the command I need is

gconftool-2 --type=string -s /desktop/gnome/background/picture_filename
/full/path/to/image/file

I have worked this into a basic shell script:

time=$1
# time to wait between changing the background in secs
while [ : ]
 do
 for filepath in `cat list`
 # list is a list of all files in the backgrounds directory and is the only
other non-image file in the folder
  do
  echo $filepath
  # for debug
  gconftool-2 --type=string -s /desktop/gnome/background/picture_filename
“$filepath”
  sleep $time
  done
 done

however allthough this sets the value (I can see it in the xml configuration
file with emacs) the background simply goes to the set colour not the image.
is there another value I need to get the background as an image? or is there
something wrong with my script? all help appreciated.
Jacob Mansfield
Programmer
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://lists.ubuntu.com/archives/ubuntu-uk/attachments/20101016/2769aa72/attachment.htm 


More information about the ubuntu-uk mailing list