Re: [gdm-list] gdm_common_debug()?




Andrew:

I enabled debug and am definitely am getting certain gdm debug messages. For example, everything in daemon/slave is fine, but for the gui, I only get debug messages about "Sending command" and "Got response".

Sep 22 09:36:14 nar100 gdm[2793]: Handling user message: 'ATTACHED_SERVERS'
Sep 22 09:36:14 nar100 gdmgreeter[9214]:   Got response: 'OK :0,,7'
Sep 22 09:36:14 nar100 gdmgreeter[9214]: Sending command: 'CLOSE'
Sep 22 09:36:14 nar100 gdm[2793]: Handling user message: 'CLOSE'
Sep 22 09:36:14 nar100 gdm[9181]: gdm_slave_wait_for_login: In loop

I notice you added debug messages to the code. Do you see your new messages in the code? I don't see any of your messages in your snippit
above.  If you aren't seeing your messages, you probably aren't running
your modified code.  Note you should run gdm-restart as root after
rebuilding and re-installing your code changes.  This restarts GDM (and
will log you out of any existing session).  This will ensure that GDM
uses the new code.

Also, make sure that your machine is running the GDM you are installing.
Some distros install GDM to odd locations (make sure you don't have
gdm in both /usr/bin and /usr/lib for example).  It is possible you
are building and installing your code changes, but the old GDM is
continuing to run.

Note that the GUI program that GDM launches is set in your config
file.  Run

gdmflexiserver --command="GET_CONFIG daemon/Greeter" and make sure
it is pointing to the GUI you installed and not a greeter that is
somewhere else on the machine.

I also notice that in your patch that you only modified the GUI
code for gdmlogin, so if the above command returns gdmgreeter, then
this is probably your problem.  You need to modify the code in
gui/greeter like you modified gui/gdmlogin.c to test with gdmgreeter.

Note that the GUI code doesn't have many error messages, so not seeing
any messages from the GUI even when debug is on is normal.  If you
add debug messages they should show up there if debug is turned on.

I'm trying your suggestion in Gnome bug 340148 to unset GDM_TIMED_LOGIN_OK in the slave (which I have confirmed does happen), but it seems to have no effect on the GUI.

So, have you verified that the daemon is *not* setting the environment
variable and the GUI is properly noticing it isn't set, or does the GUI
think it is set for some reason?

I am attaching my current patch.

The patch looks pretty okay.  The fact you aren't seeing the debug
messages you should be is probably the problem.  I'm guessing it's
a configuration/testing problem (like testing gdmgreeter instead of
gdmlogin)?

Probably would require some serious hacking on GDM to get
the messages to appear elsewhere.

Just for now, I suppose I could use the old C fprintf() to print to append a log file. Or I could use GDB. But, I thought perhaps there was a normal way to get these messages.

The syslog is the correct way to get the mesasges.  Unfortunately it
is hard to debug the GDM GUI programs because they are normally
started in a very different way than most GUI programs.  So you can't
really run the gdmlogin or gdmgreeter program from your session to
debug.  And it is also hard to run from a debugger (unless you
attach to a running process which requires that you are probably
remote logged into the machine).  So, unfortunately, printing
debug messages is the normal way to debug.  syslog normally works
okay, though it is a bit of a pain to have to modify the code to
add new debug messages to figure out some bug.

Note you can run the GUI from your session if you first set
DOING_GDM_DEVELOPMENT=1.  This is useful for testing some bugs,
but since the GUI isn't being controlled by the daemon, a lot of
features are disabled when you run it this way.  For the bug
you are working on, which involves daemon/GUI interaction,
running this way won't help you debug, I don't think.

Brian




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]