I am using the 13.04 x64 release of Ubuntu on my PC and at least it works so far as it should. But suddenly the lightdm crashes during boot and even if I try to start it manually from terminal after switching to another tty.

I don't know what may cause the problems because I didn't even install any graphics-drivers for my nvidia card (because I just know those problems since years and skip those problems by not installing any of them).

It worked fine for some days after fresh install and updates, but now it just does not what it should.

Switching to gdm did solve the problem logging in to my computer with a gui but hell this lightdm should work I guess..

The logs aren't pretty much of help for me but maybe someone know what's up?

I started experiencing this issue after applying the current lightdm patch last week. The greeter would fail to start due to lack of access to /var/lib/lightdm/.Xauthority, the result being a low graphic mode error which could only be resolved for one session by removing /var/lib/lightdm/.Xauthority. This issue seems to be caused by this new patch which gives the .Xauthority file much tighter permissions (600 rather than 664). See the following:

lightdm (1.6.0-0ubuntu3.1) raring-security; urgency=low

SECURITY UPDATE: wrong permissions on .Xauthority file (LP: #1175023)

debian/patches/07_xauthority_perms.patch: use g_open instead of
g_file_set_contents in src/xauthority.c.

The suggested fix above seemed to work for about a half-hour until the old behavior returned, with the additional problem of stale .Xauthority files being left behind with 600 permissions in user home directories, causing graphical login loops.

To work around this issue, I have created a wrapper script for xfce-session-logout (I use XFCE) which removes .Xauthority from both user home directories and from /var/lib/lightdm. Since this script must use sudo to assume the correct authority to remove /var/lib/lightdm/.Xauthority, this is hardly ideal, although it works. Using gdm also avoids this issue. My situation is also complicated perhaps by the fact that I access the local system via the console and via xdmcp.

To address the security issue in the patch above, Ubuntu needs to patch whatever other programs (the greeters for example) need access to .Xauthority since currently by fixing the security issue, they have effectively broken lightdm. That is not very good.

I've been having the same issue on Debian Sid and find removing the .Xauthority file rectifies it, although not a very reliable solution as I have had to do it every time I reboot, it's a workaround that enables me to get back to my gui.

Rename the file /var/lib/lightdm/.Xauthority to /var/lib/lightdm/.Xauthority-BAK with

I appreciate your approach, thank you. But even though this may work (i have not tested it yet) I would then keep to gdm instead of having scripts removing other files just for a lightdm. anyhow thank you for your help!
–
StefanSep 19 '13 at 13:37