How do I get rid of the login screen loop in Ubuntu?
Press Ctrl + Alt + F7 to get back to the login screen which should now look different. Does logging in work? If it does, your problem is solved! If it doesn't, go back to the fullscreen terminal (again, Ctrl + Alt + F2 ) and run sudo dpkg-reconfigure lightdm to set LightDM as you login manager again.
How do you fix Xauthority?
Change the Permissions of Xauthority
Instead of root, your user and group should own that Xauthority file. You can change the ownership by running the chown command with sudo. That should go off without a hitch, so you're ready to try logging in again. Press Ctrl + Alt + F7 to return to your normal login screen.
What is Xauthority file?
The . Xauthority file can be found in each user's home directory. It is used to store credentials in cookies used by xauth for authentication of XServer. When an XServer instance (Xorg) is started, the cookie is used to authenticate connections to that specific display.
What causes login loops?
Login loop is an issue when you log-in to your system and it takes back you to the login screen again, instead of letting you use the desktop and this process repeats indefinitely. ... This happens because of some irrelevant changes to the files in your system caused by the display manager.