Wednesday, November 10, 2010

HOWTO: Manually set GDM Background and GTK Theme

My search for a new display manager ended me back at GDM after several long hours of searching. I was a bit tired of GDM's bland default brown background and the Clearlooks GTK theme so I deiced to change these. After much searching around I only found links describing how to change these options through GUI tools. I did not want to install an application to accomplish these two simple configuration changes - luckily I didn't have to and neither do you.

To change these keys we will not be editing configuration files in a text editor, instead we will simply use the gconftool-2 to set the values we want. To set the GDM background run the following command in terminal:

sudo -u gdm gconftool-2 -t str -s /desktop/gnome/background/picture_filename /path/to/pic

For example, if the background I want is one of my shared backgrounds called "background.png" I would set it as such:

sudo -u gdm gconftool-2 -t str -s /desktop/gnome/background/picture_filename /usr/share/backgrounds/background.png

The GTK theme your GDM uses is set in a similar manner:

sudo -u gdm gconftool-2 -t str -s /desktop/gnome/interface/gtk_theme ThemeName

You can see what GTK themes are install on your system by looking in your /usr/share/themes directory. For example to set your GDM to use the Crux GTK theme you would run the following:

sudo -u gdm gconftool-2 -t str -s /desktop/gnome/interface/gtk_theme Crux

Enjoy your new GDM background and GTK theme!

~Jeff Hoogland


  1. Thank you for the valuable hint !
    While setting the background I noticed a few more options:
    sudo -u gdm gconftool-2 -t str -s /desktop/gnome/background/picture_options wallpaper

    Note: "wallpaper" means tiled. Other options are "centered", "scaled", "stretched", "zoom", "spanned"

    sudo -u gdm gconftool-2 -t str -s /desktop/gnome/background/icon_theme nameoftheme

  2. Why not just run gnome-appearance-properties as the gdm user?

    xhost +SI:localuser:gdm
    sudo -u gdm dbus-launch gnome-appearance-properties
    xhost -SI:localuser:gdm