I have ubuntu server 12.10 and installed ubuntu-desktop to access it via GUI and changed the default runlevel to 5. Now I get the GUI login screen with my username (display name) but when i enter my password the screen just flicks and comes back to login screen ( doesnt give me any error). the same user works fine with same credentials in CLI.

strange thing is when i click on guest, it logs me in straight away and works fine.

Any solution please.

PS: I am new to Ubuntu/linux, Keeping in mind, please be basic and simple.


1 Answer 1


This looks like the .Xauthority file is corrupted. Try this in a tty:

sudo mv .Xauthority .Xauthority_backup

Then restart lightdm and try to log in again:

sudo service lightdm restart

If that was not the cause, restore the file to its previous state:

sudo mv .Xauthority_backup .Xauthority
  • 1
    Hi darent. thankyou for your reply but unfortunately No success with it..
    – user251447
    Feb 23, 2014 at 16:24
  • 2
    Yes , this was the problem and it worked ..thanks for sharing...
    – Buminda
    Jun 2, 2015 at 1:31
  • 1
    wow!!! This is a terrible user experience!!! wondering how many gurus we need around just to be able to log into a linux distro. thanks for the fix! Oct 25, 2017 at 11:32

Not the answer you're looking for? Browse other questions tagged .