1

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

5
  • 1
    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, 2013 at 18:25
  • both doesn't work :S
    – mohammad
    Jun 11, 2013 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, 2013 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, 2013 at 10:46
  • 2
    Possible duplicate of Ubuntu gets stuck in a login loop
    – karel
    Jul 2, 2019 at 15:33

2 Answers 2

1

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.

8
  • 1
    what does the command chown user:user .Xauthority do?
    – Alvar
    Jun 11, 2013 at 18:35
  • it says no such file or directory
    – mohammad
    Jun 11, 2013 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?
    – Dan
    Jun 11, 2013 at 18:44
  • i am nor sure how to check that :)
    – mohammad
    Jun 11, 2013 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.
    – Dan
    Jun 11, 2013 at 18:57
0

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.

2
  • but how can the terminal log in work then?
    – Alvar
    Jun 11, 2013 at 18:41
  • 1
    the gui login uses its own keyboard settings, independently of the cli which is in sync with the rest of Ubuntu
    – vinnief
    Jun 11, 2013 at 18:48

You must log in to answer this question.

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