Previous Section  < Day Day Up >  Next Section

Recipe 15.11. Changing Your Login Display Manager

15.11.1 Problem

You don't like your login display manager, and you want to try a different one. Perhaps your distribution installed xdm, which is rather bare-bones, and you'd like to try a login display manager with more features, like gdm or kdm. Or you've having problems, such as hanging at shutdown, and you think a different login manager might help.

15.11.2 Solution

The three main display managers are xdm (X display manager), gdm (Gnome display manger), and kdm (KDE display manager). To find out which one your system is using, use ps:

$ ps ax | grep dm

3796 ?   S    0.00  /usr/bin/kdm -nodaemon

Most distributions use /etc/X11/default-display-manager. It should contain a single line:

/usr/bin/kdm

Change this to the display manager of your choice, using the full pathname:

/usr/bin/gdm

or:

/usr/bin/xdm

Red Hat and Fedora do it a little differently. Edit /etc/sysconfig/desktop, and add this line:

DISPLAYMANAGER="GNOME"

or "KDE," or "XDM." Don't use the paths to the executables; that doesn't work.

15.11.3 Discussion

xdm, the X display manager, can be thought of as a graphical replacement for the login command. It requires only the X Windows System to run, unlike gdm and kdm (which require Gnome and KDE, respectively).

gdm and kdm do the same thing as xdm, plus allow users to shutdown or restart; select a different window manager or desktop; and customize the login screen with a picture or logo.

Red Hat and Fedora use the /etc/X11/prefdm script to start the display manager, which is called from /etc/inittab. /etc/X11/prefdm looks to /etc/sysconfig/desktop for the default display manager, as you can see by reading the script:

$ less /etc/X11/prefdm

...

preferred=

if [ -f /etc/sysconfig/desktop ]; then

     . /etc/sysconfig/desktop

       if [ "$DISPLAYMANAGER" = GNOME ]; then

         preferred=gdm

       elif [ "$DISPLAYMANAGER" = KDE ]; then

         preferred=kdm

       elif [ "$DISPLAYMANAGER" = XDM ]; then

         preferred=xdm

       fi

fi

This is where we see that it wants DISPLAYMANAGER = "GNOME", instead of /usr/bin/gdm.

If you peruse Red Hat's /rc*.d directories, you'll notice there are no entries for any display manager. How can this be? Take a look at the bottom of /etc/inittab:

# Run xdm in runlevel 5

x:5:respawn:/etc/X11/prefdm -nodaemon

The moral is, in Linux, there are always many ways to do things.

15.11.4 See Also

    Previous Section  < Day Day Up >  Next Section