I tried out the sudo reboot command on my machine which has Ubuntu 19.04 installed, and I got stuck in a login loop. A common advice was to modify the .Xauthority file but I don’t even have that. I haven't found anything specific to sudo reboot. What should I try doing?

I tried booting Ubuntu 19.04 once in recovery mode and followed steps 1-4 at the end of the answer, but that didn't do it.

I also checked whether or not I have enough disk space in my home directory, and I do (73% available)

Also, I have two users on my system, and the problem pertains to both users.

  • 2
    If you have insufficient space in $HOME (your user directory) for the creation of gui working files (created at login), the login will stop and you'll return to greeter (ie. login loop). I'd suggest logging in via terminal (which has no need to for working files thus will proceed) and check using df (disk free) that you have space in $HOME. This is my most common issue, and what I'd check unless you made changes that could have caused it (and not told us about). – guiverc Aug 5 '19 at 11:34
  • I checked that, I do have a lot of available space (73%) – An Ignorant Wanderer Aug 5 '19 at 11:42
  • find $HOME -not -user $USER please. – nobody Aug 5 '19 at 13:27
  • @nobody sorry I didn’t get that what do you mean? – An Ignorant Wanderer Aug 5 '19 at 14:09

This post's method 2 ended up solving my issue:

For reconfiguring:

sudo dpkg-reconfigure lightdm


sudo apt purge lightdm && sudo apt install lightdm

Or install gdm3 in place of lightdm:

sudo apt purge lightdm && sudo apt install gdm3
  • I've used this method in conjunction with a login loop and it worked, however in my case the initial problem was a black screen when booting not a login loop. I fixed the black screen which created a login loop, and what fixed the login loop was modifying the .Xauthority file to Xauthority.bak so that it would be automatically re-created. This is the same as your method, except that it was done in the reverse order. btw for anyone else who reads this comment, I don't think that your question is unclear for the reason that I explained. – karel Aug 5 '19 at 18:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.