After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 340610 - gdmsetup should have better failure message
gdmsetup should have better failure message
Status: RESOLVED DUPLICATE of bug 162849
Product: gdm
Classification: Core
Component: general
2.14.x
Other All
: Normal normal
: ---
Assigned To: GDM maintainers
GDM maintainers
Depends on:
Blocks:
 
 
Reported: 2006-05-04 11:01 UTC by Sam Morris
Modified: 2007-03-21 08:17 UTC
See Also:
GNOME target: ---
GNOME version: 2.13/2.14



Description Sam Morris 2006-05-04 11:01:39 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:
Comment 1 Brian Cameron 2006-05-04 19:48:05 UTC
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?
Comment 2 Sam Morris 2006-05-05 09:18:08 UTC
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.
Comment 3 Lukasz Zalewski 2007-01-27 19:37:31 UTC
Hmm this might of been fixed in bug #352263. Sam i guessing you have no way of replicationg this problem again
Comment 4 Brian Cameron 2007-01-29 05:04:40 UTC
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.


Comment 5 Lukasz Zalewski 2007-01-29 12:08:42 UTC
>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


Comment 6 Lukasz Zalewski 2007-01-29 18:58:52 UTC
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
Comment 7 Lukasz Zalewski 2007-01-29 19:57:27 UTC
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
Comment 8 Brian Cameron 2007-01-30 03:13:10 UTC
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.
Comment 9 Brian Cameron 2007-03-21 08:17:34 UTC

*** This bug has been marked as a duplicate of 162849 ***