Meaning of files in /var/log/lightdm/ and how to properly read lightdm.log file?

Solution 1:

Read this Q&A if you want more info on the boot/login process.

lightdm.log is the log file where your display manager (also called login manager) lightdm write its messages.

After lightdm started the X-server, the X's first and last messages (like a header and a footer) will go into x-N.log, where N represents the display, just like in /var/log/Xorg.N.log which is the log file for the other messages from X.

The x-N-greeter.log file is the log file where the greeter (on ubuntu it is unity-greeter) messages are written, N again represents the display number.

You should start with lightdm.log and read it sequentially, and you will see that is is always reported when and where newer log files are created, e.g.:

[+0.22s] DEBUG: Logging to /var/log/lightdm/lightdm.log
...
[+0.31s] DEBUG: Logging to /var/log/lightdm/x-0.log
...
[+0.87s] DEBUG: Logging to /var/log/lightdm/x-0-greeter.log

Yes, those log files are regenerated on every reboot, but the previous log is saved with the .old suffix.