GNOME Bugzilla – Bug 340610
gdmsetup should have better failure message
Last modified: 2007-03-21 08:17:34 UTC
Please describe the problem: When running gdmsetup, the following is printed to the console: Command failed, no data returned Trying failed command again. Try 2 of 5. gdmsetup then runs, however changing any option causes it to segfault. I haven't restarted gdm since upgrading so I assume this is caused by the new gdmsetup not knowing how to talk to the old GDM (2.13.0). If this is the case, gdmsetup should just display a 'gdm needs to be restarted' error and exit. Steps to reproduce: Actual results: Expected results: Does this happen every time? Other information:
Thanks for the bug report, could you turn on debug, by setting "Enable=true" in the [debug] section of the /etc/gdm/custom.conf file, restart GDM by running gdm-restart (this will log you out), and send me the GDM messages sent to your system log (/var/log/messages). This will help me understand what is going on. It sounds like gdmsetup is having trouble connecting to the daemon socket for some reason. Most people don't have this sort of problem, but your system setup may disallow the socket setup for some reason?
Well, once I restarted GDM, the problem disappeared. I think it was caused by gdmsetup 2.14.5 talking to gdm 2.13.0. The bug is that gdmsetup fails to exit with a clean error message in this case.
Hmm this might of been fixed in bug #352263. Sam i guessing you have no way of replicationg this problem again
The reported problem would likely happen if the user tried to run gdmsetup when the GDM daemon isn't running. This could happen if the system has more than one display manager and the user isn't using GDM. For example, on Solaris where CDE login is the default login program, and GDM is only used if the user/sysadmin switches from CDE login to GDM. So when you try to run gdmsetup, it can't connect to the ddaemon. This problem could also happen if the GDM socket (note /tmp/.gdm_socket) is not working or available (e.g. due to permissions or system configuration that somehow limits the ability of sockets to work). Note related bug 331059 If you want to test this, I'd recommend moving your /tmp/.gdm_socket file to a different name after logging in and trying to run gdmsetup. You'ld probably see the same error. Might be nice if GDM printed out a nicer error message explaining what the problem is.
>The reported problem would likely happen if the user tried to run gdmsetup when >the GDM daemon isn't running. I have tested this scenario when sorting out bug #352263 (I was running kdm and tried to use gdmsetup). The following bit of code takes care of it (producing error dialog box with relevant info): . gdm_running = gdmcomm_check (TRUE); if (gdm_running == FALSE) exit (EXIT_FAILURE); . >If you want to test this, I'd recommend moving your /tmp/.gdm_socket file to a >different name after logging in and trying to run gdmsetup. I will test it this evening and will let you know
Oki after moving /tmp/.gdm_socket the following gets displayed (in the console): Failed to connect to socket, sleep 1 second and retry Trying failed command again. Try 2 of 5. . . . Command failed 5 times, aborting. Could not access configuration key <daemon/PidFile=/var/run/gdm.pid> Using compiled in value </var/run/gdm.pid> for <daemon/PidFile=/var/run/gdm.pid> Then dialog box appears: Cannot comunicate with GDM (The GNOME Display Manager) Perhaps you have an old version of gdm running. Then gdmsetup terminates
if the daemon isn't running at all (i was testing this by running kdm) and gdmsetup is started we get the following (on the console): Failed to connect to socket, sleep 1 second and retry Trying failed command again. Try 2 of 5. . . . Command failed 5 times, aborting. Could not access configuration key <daemon/PidFile=/var/run/gdm.pid> Using compiled in value </var/run/gdm.pid> for <daemon/PidFile=/var/run/gdm.pid> Then Dialog box appears: GDM (The GNOME Display Manager) is not running. You might in fact be using a different display manager, such as KDM (KDE Display Manager) or xdm. If you still wish to use this feature, either start GDM yourself or ask your system administrator to start GDM. Then gdmsetup terminates
Yes, this is the situation that may need a better debug message. Note that most GDM client programs (gdmflexiserver, gdmXnest, and the others that install to /usr/bin/gdm*, /usr/sbin/gdm*) probably load configuration data and may need better error messages too. Probably not possible to easily put this "better error message" into the gui/gdmcomm.c code because some clients are GUI ones (gdmsetup) and some are command line ones (gdmflexiserver). Some need to echo a message to stderr and some need to pop up a GUI. Might be necessary for each client to process the error message separately.
*** This bug has been marked as a duplicate of 162849 ***