I am using Ubuntu Gnome 14.04 and gnome-settings-daemon-localeexec is not started on login. How can I debug why this is happening?
I've found this question: gnome-settings-daemon not starting when I login, but it is not really a solution for me, so I want to debug it and find the real problem and probably file a bug if needed.
I am an experienced linux user but I don't know how the gnome shell startup proces works and where to start.
EDIT:
These might be related questions:
- How to debug slow session start of Gnome 3? -> This one doesn't help, the gnome-shell process seems to die upon login hence I see nothing usefull on strace output
- How to debug session startup issues? -> This does not seems to be valid anymore
EDIT 2:
I've opened a bug report on launchpad, lets see if that helps: gnome-settings-daemon-localeexec is not started on login
EDIT 3:
Found these other threads that might help:
- [Solved] [gnome-unstable] gnome-settings-daemon does not work -> Added –debug to gnome-settings-daemon and nothing is shown at ~/.cache/gdm/session.log
- Debugging GNOME Shell -> Does not help as gnome-shell is not crashing
Best Answer
Debugging is a process, so I will describe the process that I would use to attack such a problem. The questions are:
If it is a problem with an account (user config), and it works with a newly created account, then you can track the problem down by copying config files from the broken account to the working account, and testing login, until it breaks. (Or, alternatively, start with the broken account, and remove files and directories until it works.) Approach this as an iterative process - begin, copy a directory/file set, did it break the account yes/no, eliminate half the set, goto begin. It can be time consuming, so usually people will just reset the account and not bother to track down what broke.
If you want to track down the software source of the problem, first look in ~/.cache/gdm/session.log and /var/log/syslog to see if there are any obvious errors related to your problem. Then use the source:
So now we know gnome-settings-daemon-localeexec is run from a .desktop file called gnome-settings-daemon.desktop. Where is it installed?
Try to run it to see if there is a problem running the actual daemon (crashing etc.):
You can also try:
Is the autostart being run? Searching for "debug gnome autostart" results in this page, which suggests:
So try that, and then check /var/log/syslog. Another alternative here is to modify /usr/lib/gnome-settings-daemon/gnome-settings-daemon-localeexec and add debug statements. It is just a shell script, so add something like
echo "localeexec date $(date) env $(env)" > /tmp/log
. Then log in and check /tmp/log.(When debugging any given program there is usually a way to append your print statements to a "proper" log file, but opening your own log file is often easier and quicker, as it keeps your debugging separate, and does not require understanding the multiple layers of language/system/loglevel/filtering that are in place for any given program.)
The logging and debugging so far will probably have exposed the issue. For harder bugs, that lie in the compiled binaries, you will have to download the source with
apt-get source
, modify it to add some debugging code (print statements), compile the modified source and install it, and then test it. The great thing here is that the wholeapt/dpkg
system is designed to make this easy, quick and accessible with only a few commands. A debugger can be useful for examining complex internal program state, but using print statements is a faster process that works across all languages and systems, so that is usually my initial approach.EDIT:
As a summary of the comments, I've replaced the line in /usr/lib/gnome-settings-daemon/gnome-settings-daemon-localeexec:
with
in order to capture the process output