Red Hat Bugzilla – Bug 210829
prefdm hang when running kdm with nodaemon
Last modified: 2014-03-16 23:03:18 EDT
Description of problem:
Infinite /etc/X11/prefdm loop running
Steps to Reproduce:
1. Boot with initlevel 3
2. log in as root
3. add DISPLAYMANAGER=KDE to /etc/sysconfig/desktop
(echo "DISPLAYMANAGER=KDE" >> /etc/sysconfig/desktop)
4. run /etc/X11/prefdm
no infinite loop
Code in /etc/X11/prefdm
if [ -n "$preferred" ]; then
$preferred "$@" >/dev/null 2>&1
if [ $? -ne 127 ]; then
exec $0 "$@"
If you look, it execute kdm with prefdm argument ($@).
Then it takes the return, and exec again prefdm if the result is not 127.
The problem is that when you don't send -nodaemon to kdm inside a bash shell
(the bash shell don't have a pid of 1), kdm return immediatly the number 0 in
See kdm source code, function main():
kdm could also return the number 1 if their is a xdm already running.
Does this still happen in FC5 or the FC6 development tree?
Still happen in FC5. (it's the same prefdm script for this part)
I don't see this in testing - I set the display manager to kdm, and it runs fine.
Is there anything else unusual in your setup?
Same problem on a fresh and clean install of FC6.
If you want to see the loop, try some
And see the kdm/gdm process number that are changing...
or display an echo "in prefdm" at the beginning of the script
Oh, after re-reading I understand.
Why are you running prefdm without -nodaemon by hand?
I want to try the script, like when it starting normally. (Check what is the
default desktop manager used, what will be the result.)
Is there a documentation where the -nodaemon is specified and obligatory?
in prefdm --help ? man prefdm?
It's not documented as such, but it's more or less expected that that's how it
will be invoked.
This report targets the FC3 or FC4 products, which have now been EOL'd.
Could you please check that it still applies to a current Fedora release, and
either update the target product or close it ?
Closing; this is expected behavior.