Ubuntu login loop

Logging into Ubuntu only to have it go straight back to the login page. If you have been hit by this you know how painful and frustrating it is. Some have even gone to the extreme of reinstalling their OS.

Simply put the first step is to CTRL-SHIFT F3 login to the terminal and add a new user to your system. “sudo adduser testuser” give a simple password as you will delete when done.

Go back to your X interface and login as the testuser, yes it will work. If it does not you have something else bugging out.

Steps to check below. The newest in the line is google-remote-desktop if you have installed this remove it reboot try login. Remember you can do this all from the testuser account once logged in as X will ask you for your password when needed to complete tasks.

  1. Check the permissions on the .Xauthority file in your home directory it must belong to you owner and group
  2. Some have reported this error coming from Nvidia drivers some has said the Nouveau drivers fix it or them. Either way this has never effected me but go ahead and switch drivers if you are out of options. Open “Software and Updates” in Ubuntu and go to the Additional Drivers TAB, swicth between your drivers from there.
  3. If you gave installed anything related to screen sharing, namely google-remote-desktop (yip this caused it for me recently) remove and restart.

Hope on of these work for you.

As and end game if it does not. Create a new account closer to your original account name move your stuff across and remove your old account completely, ensuring home directory is also removed. Dont forget to give your new user account sudo rights. i.e. “usermod -aG sudo username”