How Do I Fix Ubuntu Can Not Login to Desktop (Loop) with Weird Login Screen - Linux distributions are extremely powerful system, but it doesn't mean things can't go wrong. A classic example is login issue. Today, I encountered an issue about this thing, which resulted in Ubuntu login loop.

The login screen asks for username and password, but it looks like Alien and doesn't let me in even I put a right credential. I decided to make this tutorial, in case you run into the same issue.

So, here's the screenshot (I'm running Elementary OS 5.1 anyway) :

Fix Ubuntu Login Loop

After checking the log, I find that I installed a package called "xdm" by accident. Xdm aka X Display Manager is the default display manager for the X Window System. It is a bare-bones X display manager.

Well, here are all you need to do to fix the issue. Press Ctrl+Alt+F1 to switch to TTY and then enter your Ubuntu username and password.

Suggested Read :

Once logged-in, run the following command to remove the package :

sudo apt remove xdm

Reboot your computer to see the changes. Ubuntu should use the default login manager again.

As an alternative to uninstalling xdm, you can use :

sudo dpkg-reconfigure display-manager

Don't forget to replace display-manager with your display manager e.g gdm3, lightdm. So, these were all I can share. Hope this short guide helped you to fix your Ubuntu login screen problem. Thanks for reading!.