How to debug session startup issues?

Asked by Rob Taylor

It's really quite tricky debugging session start issues, and poorly documented. I'm going to tell you some tricks in the answer to this question.

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu gnome-session Edit question
Assignee:
No assignee Edit question
Solved by:
Rob Taylor
Solved:
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1

Is this a question or are you going to answer your OWN question. If you intend to answer your own question please post as a how to on the ubuntu forums, not here.

if you have a question, please give details of what you are experiencing and we can assist.

Revision history for this message
Rob Taylor (robtaylor) said :
#2

So, something isn't starting up correctly in your session, and you want to know how to go about debugging it.

Here are some tips and tricks -

1) edit /usr/share/xsession/gnome.desktop (or any of the others there if your issue is with other gnome-session based desktop environments, e.g. gnome-classic)
 - change
 Exec=gnome-session
to
Exec=gnome-session --debug

2) restart gdm using
sudo service gdm restart

3) log into your account

4) read the woes and tribulations of gnome-session in ~/.xsession-errors

Note that the stdout and stderr of any programs launched by gnome-session will also appear in this log. If you know your app that's having issues has a debug mode, you can usually edit it's .desktop file (usually found in /usr/share/applications or /etc/xdg/autostart) to add a debug flag to it's Exec line, just like we did for gnome-session.

Happy hunting!

Revision history for this message
Rob Taylor (robtaylor) said :
#3

@actionparsnip: oh rly? I'm not sure ubuntu forums is the place for deep debugging howtos. Then again neither is here. We so need devnuggets.launchpad.net :P

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#4

yes there are tonnes of how tos on the forums and that is the place for them. I suggest you read ANY of the other posts to see what these pages are for.

Revision history for this message
Rob Taylor (robtaylor) said :
#5

@actionparsnip: I do and have, this isn't user-facing stuff, it's for devs. Jorge Castro suggests Stack Overflow as the best place nowadays.