Solution 1:

I was able to fix this myself by removing the file ~/.Xauthority. For the record, you can find startup logs for LightDM under /var/log/lightdm - from there I was able to see that LightDM was getting stuck on something in that file, so I renamed it and was able to successfully log in.

Solution 2:

I tried most of the above suggestions but after googling this error message found in .xsession-errors

mkdtemp: private socket dir: Permission denied

found this answer that worked

sudo chmod 1777 /tmp

http://mihirknows.blogspot.com/2008/06/mkdtemp-private-socket-dir-permission.html

Solution 3:

I had the same problem occurring to me (Ubuntu 12.04 LTS). I think it was because I was trying out startx -command with sudo.

I found out that the ~/.Xauthority -file was being owned by root, so at the login screen I hit ctrl+alt+f2 and from there I changed the ownership back to me (sudo chown user:user .Xauthority) and was able to login again.

Solution 4:

GDM is still here if you want, you can do a :

sudo dpkg-reconfigure lightdm

And the prompt will ask if you want to start with LightDM or GDM. So if you are stuck again with LightDM or if you don't like it you can always go back to GDM.

But the solution of George Edison should work.

Solution 5:

None of the previous suggestions here worked for me, but this made a difference:

In /etc/X11/default-display-manager changed lightdm to /usr/sbin/lightdm

I take zero credit for this; merely found this online somewhere among fifty other possibilities after days of trial&error. 11.10 is up to date and trying proprietary ATI driver fglrxdrm 8.93.4