Description of Problem:
The /etc/sysconfig/desktop file that is configured during a RedHat install where Gnome is the chosen as the desktop will contain the string 'GNOME'. This results in 'gdm' being chosen as the login/display manager progem. However, changing the contents of this file to 'KDE' or 'KDE2' still result in 'gdm' being launched as the login/display manager.
How Reproducible:
Always
Steps to Reproduce:
1. Edit the file /etc/sysconfig/desktop to contain only the text 'KDE'.
2. As root, kill -TERM the parent gdm process, causing init to restart X.
Actual Results:
Once init has restarted X, you will still see the Gnome login window.
Expected Results:
The user should see the KDE login window instead.
Additional Information:
When you run /etc/X11/prefdm in shell debug mode, you will see that even when /etc/sysconfig/desktop contains 'GNOME', it actually launches GNOME becuase it is the fallback login manager, not becuase it was specified.
The only way to force /etc/X11/prefdm to honor your choice of login manager, you have to put 'DISPLAYMANAGER=KDE2' or 'DISPLAYMANAGER=GNOME' into /etc/X11/desktop.
Here is a transcript of a run of prefdm with extra echo's from me. When this was executed the /etc/X11/dekstop file contained 'KDE2':
+ '[' -f /etc/sysconfig/desktop ']'
+ echo 'found /etc/sysconfig/desktop'
found /etc/sysconfig/desktop
+ source /etc/sysconfig/desktop
+ '[' -n '' ']'
+ echo 'desktop: '
desktop:
+ echo
+ '[' '' = GNOME ']'
+ '[' '' = KDE -o '' = KDE1 -o '' = KDE2 ']'
+ '[' '' = AnotherLevel ']'
+ '[' -z '' ']'
+ which gdm
+ preferred=gdm
+ echo 'pref2 is gdm'
pref2 is gdm
+ '[' -n gdm ']'
+ which gdm
++ which gdm
+ exec /usr/bin/gdm