gnome_bg_rotate dir
First, some background: the Webshots software is a nice way to get pictures of just about any type on your desktop, but it's just for Windows and Macs. Fortunately, Linux users can grab James Banford's webdec software to painlessly download WebShots and extract corresponding JPEG files to a specified directory.
This script just fills in the last small piece of the puzzle: rotate the Gnome background to the least-recently-seen picture in the download directory. I run this hourly out of crontab to get a changing background picture throughout the day.
UPDATE [2009-01-13]: Upgrading to Fedora 10 broke this neat little script that had been chugging along for about 6 years on various Linux boxes at home and work.
It worked just fine from the command line, but (as noted above) its normal use was in crontab, and that was failing to change the picture.
It turns out that gconftool-2 now needs to have the DBUS_SESSION_BUS_ADDRESS environment variable set properly in order to work; it is set automatically when you're in the Gnome environment, but isn't available to a crontab-run script.
So: the script now digs out the proper environment variable itself from a file in $HOME/.dbus/session-bus/. This file doesn't exist when you're not logged in, but in that case there's no need to change the background.
I found the clue to getting this working again in this article from the Srijith Unplugged blog.
Last modified: January 13 2009 16:17 EST
Paul A. Sand, pas@unh.edu