freshwall is an utility that selects a random background from the ~/.gnome2/backgrounds.xml file (or any other file in the same format). The chosen background is then set as the current GNOME background via gconf.
A preferences mode is also included, using the -p or --preferences option.
The basic functionality requires Python 2.4-2.6 and the Python GConf bindings. The --preferences switch requires PyGTK (and GTK+) as well, both version 2.4 or better.
To change the wallpaper periodically, you'll have to run the script from cron. I personally prefer to set the wallpaper at login and leave it alone for the session, so I added it to Preferences → Sessions instead.
- Version 1.1 adds a daemon mode; the daemon can be launched with -d or --daemon and shut down with -x or --exit-daemon.