Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

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

after typing my password and press enter it takes me back to the page and ask to me to enter my password again I can login as a guest and am able to login in the terminal ( ctrl+alt+F1 )

but not with the graphical interface

share|improve this question
Try this: log into the virtual terminal at Ctrl+Alt+F1, and type mv ~/.Xauthority ~/.Xauthority.old and then try to login to the GUI. If it doesn't work at first, try a reboot. If it doesn't work, do tail /var/log/lightdm and tell us what the output is. – Alaa Ali Jun 11 '13 at 18:25
both doesn't work :S – mohammad Jun 11 '13 at 20:54
What is the output when you did mv ~/.Xauthority ~/.Xauthority.old? And for the second command, I'm sorry, it should be sudo tail /var/log/lightdm/lightdm.log. Give us the output of this command. – Alaa Ali Jun 12 '13 at 5:49
for the first command it says No such file or directory and the same for the 2nd command as well – mohammad Jun 12 '13 at 10:46

When logged in to the terminal look for a file in home directory called .Xauthority (hidden file) use ls -al. If the file is owned by root use sudo chown <user>:<user> .Xauthority.

share|improve this answer
what does the command chown user:user .Xauthority do? – Alvar Jun 11 '13 at 18:35
it says no such file or directory – mohammad Jun 11 '13 at 18:43
It changes the ownership of the file to your group and your user. By default every user has their own group that is named after their username. Every file has a group that owns it as well as a user. To learn more check out man chown. Is the .Xauthority file owned by root? – dan08 Jun 11 '13 at 18:44
i am nor sure how to check that :) – mohammad Jun 11 '13 at 18:53
When in the home directory run ls -al you should see a file -rw------- 1 myuser myuser 179 Jun 11 14:56 .Xauthority, if instead of saying "myuser" it says "root" then run the chown command. I should note Alaa's method should work just as well, if it is easier for you. Instead of changing the ownership it will force the creation of a new file with the correct ownership. – dan08 Jun 11 '13 at 18:57

You may have a problem with the keyboard/language settings? It seems the initial installation determines the layout for the login page, and even if you have changed the default keyboard layout, the login keyboard layout does not change with it. This happened to me and to Vic. Since 11.10 lightDM is used and it is described here. For 12.04 the procedure is described here, but it seems to be buggy.

share|improve this answer
but how can the terminal log in work then? – Alvar Jun 11 '13 at 18:41
the gui login uses its own keyboard settings, independently of the cli which is in sync with the rest of Ubuntu – vinnief Jun 11 '13 at 18:48

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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