Ubuntu 12.04 Can’t Login to Desktop unless using Guest Session

After re-installing my PC using Ubuntu 12.04, I always do sudo apt-get update and sudo apt-get upgrade, so my system is always up to date.

But after I do this sudo reboot, I can’t login to my Ubuntu 12.04 desktop.

Then I try to login to my PC using PuTTY from my Windows laptop. The result is I can logged in to my Ubuntu 12.04 machine. It means that the password I entered is correct, and there’s something wrong with my Ubuntu.

After googling for a while, I found out that there are many users out there that had the same problem as me.

The solution that worked for me is rename or delete .Xauthority file located on your home directory. As for me, it’s located in /home/wks-403/.Xauthority. Yours may be vary.

So here’s what I do. I logged in to my Ubuntu 12.04 using PuTTY from other machine, and I delete that .Xauthority file.

sudo rm /home/wks-403/.Xauthority
sudo reboot

That’s it. After rebooting my Ubuntu 12.04, I can log in again to my desktop.

PS: if you don’t have other machine to logged in from, you can also using Ubuntu Live CD or USB flash disk.

Latest Comments