[K12OSN] Changing the default desktop background: a test package

Eric Harrison eharrison at mail.mesd.k12.or.us
Fri Jun 17 04:58:45 UTC 2005

I think I have a reasonable way to alter the default GNOME desktop
background image.

If you would like to help test this out, you can grab it at:


There are two ways to use it:

1) From the command line, execute "/usr/sbin/default_desktop <image>",
    such as:

        /usr/sbin/default_desktop /usr/share/backgrounds/images/k12ltsp/mexican_sunset.jpg

2) From root's desktop, find the image you want and drag-n-drop it on the
    "Set the default background image" icon on the desktop.

Using the command-line tool, we can define the default desktop during the
install processes.

Here is how it works (or is supposed to work, anyways ;-)

* checks to make sure that the image file exists, if not it displays a
   usage message and exits

* verifies that the image file is indeed most likely an image file of
   some sort (runs "file <filename> | cut -d':' -f2- | grep -i image"),
   if not exits with an error that the file is not an image.

* copies the image file to /etc/sysconfig/background/default.img, making
   a backup if a file by that name already exists

* changes ownership of default.img to root:root and sets the mode to 0644

* runs the "gconftool-2 --direct --config-source..." magic to make
   /etc/sysconfig/background/default.img the default background

* tells the user that the default background has been changed, but it
   won't take affect until the next time they log in

As you may note from the last step, the change is not real-time. You 
have to log out and log back in to see the new background.

Also note that this only sets the default background. If a user has
changed their background, this command will not change their background -
they will still see their custom background.

Finally, if everyone is happy with this setup, we'll have to figure
out what the new default background should be. I would suggest that I
setup a gallery on Paul's www.oregonphotoblog.org and use that to vote
for a favorite.

If you have photos YOU OWN that you would like to consider donating
the the cause, contact me off-list. If you know of some nice photos
you DON'T OWN, but are distributed under a GPL or CC license (or
something similar that we could use), send me a LINK...

For demo purposes, I grabbed a couple of my own photos off
of http://www.oregonphotoblog.org and included them in 


More information about the K12OSN mailing list