1

I am running 14.04. after typing startx command i cannot login same account again. Login screen is repeatedly showing.

I can login with guest section but i can not login to my another section . i just type startx and then screen goes blank and after reboot i cannot login into same account.

  • Welcome to Ask Ubuntu! ;-) Could you please give us a bit more information like: Can you still log on to another account? The guest session? Please edit your question and add this information... – Fabby Mar 18 '15 at 12:59
  • @Fabby There's no point even if you can log into guest session. You cannot unmake the changes made by startx – John Strood Jun 24 '16 at 10:36
1

I got your question completely. You could try the following method, it solved my problem as well.

  • You must have run startx with root privileges. Doing sudo startx or sudo su; startx makes the root owner of a file called .Xauthority required for X session login by xauth
  • NEVER use sudo for opening graphical applications. root will create files which will be owned by it, which others can't access. Since in Ubuntu by default root will have no password set, this can severely mess with your settings and your not being able to access your configuration files. Next time use a gksudo instead.
  • Since your .Xauthority file is owned by root, there is no way you can log in.
  • Find another terminal, like log in to another account and open terminal, but don't log in to guest account.
  • In case you have only one account which you can't log in, then finding a terminal is difficult since you can get one only if you can log in.
  • In that case find a terminal tty1 through tty7 by pressing Ctrl+Alt+F1throughF7. This should provide you a terminal in case you have none at your disposal.
  • Enter the login credentials of your troubled account. You can log in through a command line terminal because .Xauthority affects only X window sessions.
  • Do cd; sudo chown username:groupname .Xauthority; Replace username and groupname with your own. Usually it is the same.
  • If it successfully returns prompt, then do sudo shutdown -r 0 and login again.
| improve this answer | |
0

If login screen is repeatly showing even though you enter valid password then follow the following step to fix it. press ctrl+alt+f1 to switch to the first console. then Enter your user name and password. Then type the command mv .Xauthority .Xauthority.bak Then type exit now Press ctrl+alt+f7 to switch back to Desktop mode. Now you can login using your user name and password.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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