Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

This question already has an answer here:

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.

share|improve this question

marked as duplicate by Eric Carvalho, karel, Avinash Raj, Maythux, belacqua Mar 5 '14 at 22:36

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

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
share|improve this answer
Hi darent. thankyou for your reply but unfortunately No success with it.. – user251447 Feb 23 '14 at 16:24
It works, Thanks! – Dewsworld Jun 29 '14 at 3:51
Yes , this was the problem and it worked ..thanks for sharing... – Buminda Jun 2 '15 at 1:31

Not the answer you're looking for? Browse other questions tagged or ask your own question.