[SOLVED] Fix Login Loop in Ubuntu Linux

We face a login loop in Ubuntu, when using too many desktop environments or editing some session manager files. Some of us face it when upgrading to latest ubuntu. It is not common, but sometimes occur. So we need to know how to fix this problem.

Steps to fix login loop in Ubuntu

  1. when you on the login screen, press ctrl + shift + alt + f1
  2. a black screen appeared? ok, type your username then ENTER and type your password then ENTER
  3. then type "ping" then ENTER to ensure you have a good Internet connection. If you have Internet access follow the steps.
  4. uninstall / remove all desktop environments that does not let you log into the desktop itself
    1. for ubuntu budgie desktop
      sudo apt-get purge --auto-remove ubuntu-budgie-desktop
    2. for XFCE desktop
      sudo apt-get purge --auto-remove xfce
    3. for LXDE desktop
      sudo apt-get purge --auto-remove lxde
  5. update & upgrade
    sudo apt-get update
    sudo apt-get upgrade
    (if there is any updates or upgrades downloaded/installed, type "reboot" then ENTER to restart your computer)
  6. After that, Run those commands
    sudo apt-get purge fglrx lightdm
    sudo apt-get install lightdm ubuntu-desktop
And W E ' R E   D O N E   !

I hope you enjoyed this fix guide in brief. If you have a colleague or friend facing this issue, send him/her this blog post. If you want to get new posts, make sure to subscribe to Value In Brief by Email.