1

My Ubuntu is stuck in a login loop when trying to enter my desktop. When I login, the screen gets black and soon after that the login screen comes back.

I saw this solution: solution

But when I tried the solution it didn't work for me, then i saw a comment

@Nacht DON'T run sudo with startx. Using sudo to run startx is exactly how the permissions of the Xauthority file can get screwed up like this. Run startx as your normal user and it should work. If it doesn't, check the ownership of the .Xauthority file to make sure it's not owned by root again.

It worked but when I restart the laptop it still refuses to login.

  • Did you check the contents of the .xsession-errors file (tail ~/.xsession-errors)? it can sometimes provide a clue as to the cause – steeldriver Sep 28 '18 at 13:59
  • @steeldriver here is the list of errors i get >/usr/sbin/lightdm-session: line 24: mktemp: command not found >/usr/sbin/lightdm-session: line 29: : No such file or directory >/usr/sbin/lightdm-session: line 33: cat: command not found >/usr/sbin/lightdm-session: line 34: truncate: command not found >/usr/sbin/lightdm-seesion: line 106: ls: command not found >usr/sbin/gnome-session/run-systemd-session: 7: /usr/lib/gnome-session/run-systemd-session: systemctl: not found – Fidelis Okafor Sep 28 '18 at 19:13
  • It looks like you've hosed your PATH, similar to this previous question: another login loop problem – steeldriver Sep 28 '18 at 19:21
  • @steeldriver i tried the solutions on that question and still getting same error, am getting this error ~/.bash_login: no such directory – Fidelis Okafor Sep 28 '18 at 19:39
  • AFAIK ~/.bash_login isn't provided by default - you will need to check all the other places where PATH might be defined, starting from /etc/environment, /etc/profile, files in /etc/profile.d/, ~/.profile, ~/.bashrc – steeldriver Sep 28 '18 at 19:57

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.