I was reading some blog and I found that I can manually start GUI by issuing this command sudo startx, so I did that. I did it in the terminal with the GUI already running. Now I'm unable to login to my user account.
Before that my PC used to boot straight into my account without asking for the password (without even showing the GRUB menu since I have only Ubuntu 12.04 installed on my PC). But now it boots and lands in a screen (without showing the GRUB menu) which displays my user account along with the Guest account. When I choose my account, it asks for the password. I entered the password but it comes back again to the same screen without any response. I am damn sure that the password that I entered was right. When I choose the Guest account, everything goes well. Now I have access only to the Guest account.
I have read the answer in Unable to log in and unable to reset the password and run the command rm ~/.Xauthority but it says there is no such file. Can anyone help me. Thanks very much!!
cd ~ sudo chown username:groupname .Xauthority
(replace username and groupname with that of your own, usually your group name will be same as your username.) Thank you very much!
– Peng Weizhuang Mar 07 '15 at 03:13startx
assudo
. I updated the answer with your method, should other people have the same issue. – Mar 08 '15 at 00:17username:groupname
, just use$USER:$USER
and this will automatically use the correct username and groupname for you. – mchid Feb 28 '20 at 06:58