ohmkara 1.0

a technical blog.

gdm to kdm login in fedora

with 4 comments

Note: In the following I am talking about fedora in general and fedora 10 in particular.

I did not like the gdm(gnome display manager) login screen. As far as I am aware gdm has limited themability and hence customizability. kdm (KDE display manager) seemed better. The info given in the kdm documentation that about how to migrate to kdm was slightly off the mark (in the specific case of fedora 10, I am not sure about others) and hence this post. If you are looking for a quick way to fix this and move on, then stop reading this  post now and go read the fedora KDE wiki which details multiple ways to make the gdm to kdm transition. If you are not in so much of a hurry, do read on…..

The fedora KDE page says

….The default display manager on Fedora is GDM – The GNOME Display Manager. You can switch this to KDM – The KDE Display Manager….

The fedora KDE page details multiple ways to get the gdm to kdm switch done. One of the easiest and quickest ways (manual fix) is — add / edit lines in /etc/sysconfig/desktop  file to say…



This file is being loaded in the /etc/X11/prefdm (preferred display manager setting)which does the following (code in the prefdm file)

if [ -f /etc/sysconfig/desktop ]; then
        . /etc/sysconfig/desktop
        if [ "$DISPLAYMANAGER" = GNOME ]; then
        elif [ "$DISPLAYMANAGER" = KDE ]; then
        elif [ "$DISPLAYMANAGER" = WDM ]; then
        elif [ "$DISPLAYMANAGER" = XDM ]; then
        elif [ -n "$DISPLAYMANAGER" ]; then

But in my case (I am not sure if it is specific to my installation or more general) there was no /etc/sysconfig/desktop file and sice I was not sure if that file was supposed to do something else too i.e if I add these two lines alone will something else break (i.e if that file is there, is it supposed to contain something else?). I switched to kdm in a different (simple) way (as in lesser editing and lesser time to implement) i.e There is a 3rd way :P. If there is no /etc/sysconfig/desktop file there is a catch-all fallback scheme at the end of the /etc/X11/prefdm script which originally read as follows.

# Fallbacks, in order
exec gdm “$@” >/dev/null 2>&1 </dev/null
exec kdm “$@” >/dev/null 2>&1 </dev/null
exec wdm “$@” >/dev/null 2>&1 </dev/null
exec xdm “$@” >/dev/null 2>&1 </dev/null

Which I changed to….

# Fallbacks, in order
exec kdm “$@” >/dev/null 2>&1 </dev/null
exec gdm “$@” >/dev/null 2>&1 </dev/null
exec wdm “$@” >/dev/null 2>&1 </dev/null
exec xdm “$@” >/dev/null 2>&1 </dev/null

And it worked. Please note this is a fix only if you do not have a /etc/sysconfig/desktop file. If you have that file the fix with the file (manual fix) suggested by the fedora KDE wiki — Link is the way to go.

P.S: Only now am I checking out what the etc/sysconfig/desktop file does. God says here that.

If some of the files listed here are not present in the /etc/sysconfig/ directory, the corresponding program may not be installed….

4.1.5. /etc/sysconfig/desktop

The /etc/sysconfig/desktop file specifies the desktop for new users and the display manager to be run when entering runlevel 5.

Correct values are:

  • DISPLAY=<value>, where <value> is one of the following:
    • GNOME — Selects the GNOME desktop environment.
    • KDE — Selects the KDE desktop environment.
  • DISPLAYMANAGER=<value>, where <value> is one of the following:
    • GDM — Selects the GNOME display manager.
    • KDM — Selects the KDE display manager.
    • XDM — Selects the XFree86 display manager.

For more about the X Window System under Red Hat Enterprise Linux, refer to Chapter 7 The X Window System…..

So you sure can edit /etc/sysconfig/desktop on your own. But if you do that you are locking the new user logins to default to kde.

Anyways hope that was useful…..


Written by deepak

January 11, 2009 at 10:14 am

Posted in linux

Tagged with ,

4 Responses

Subscribe to comments with RSS.

  1. Or you can just install system-switch-displaymanager.


    February 7, 2009 at 5:41 am

    • sure… i had not mentioned that option specifically in the post… the fedora KDE wiki does mention it and i felt that editing is a better solution than installing another package just for this.


      February 7, 2009 at 8:33 am

  2. In the section “Fedora KDE page says” you define DISPLAYMANAGER=”KDE”, shouldn’t that be DISPLAYMANAGER=”KDM”


    March 7, 2009 at 3:11 am

    • I guess that it is DISPLAYMANAGER=”KDE”, other files like perfdm checks for this condition as follows, setting the preferred display manager program.
      elif [ “$DISPLAYMANAGER” = KDE ]; then
      {end quote}


      March 7, 2009 at 8:29 pm

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: