Ubuntu 18.04 stuck in login loop with missing .Xauthority file
Solution 1
Method 2 in this article worked for me. I am using an old Sony Vaio laptop and think the issue is a graphics problem.
Reinstalling Ubuntu lightdm.
sudo apt-get purge lightdm sudo apt-get install lightdm sudo dpkg-reconfigure lightdm
Solution 2
Try updating your graphics card driver.
First, see what driver you need:
ubuntu-drivers devices
Then download the recommended driver for your graphics card. For example, if the recommend driver was nvidia-390
:
sudo apt install nvidia-390
Related videos on Youtube
Kaszt
Updated on September 18, 2022Comments
-
Kaszt over 1 year
My computer running Ubuntu 18.04 is stuck in a login loop. I am using lightdm as my display manager, but trying to switch to gdm3 didn't fix the problem (I was still stuck in a login loop).
I have tried to follow the fixes found here to fix it, but after running
ls -la
there is no.Xauthority
file in my home directory. I think this is related to my login loop problem, but I am not sure how to create a new.Xauthority
file?Update: I switched to
gdm3
and can now login with Unity for a few seconds. The desktop loads but after a minute I am in a login loop again.-
steeldriver over 5 yearsA new
.Xauthority
file should be created when you successfully start an X-based desktop session. AFAIK not having one initially is not a problem in itself. I suggest you look for an.xsession-errors
file (e.g.tail ~/.xsession-errors
) to see if it throws additional light on the real issue. -
Kaszt over 5 yearsThanks for the tip, but trying to read the error file yields an error because there is no
.xsession-errors
folder in the home folder either. Output fromtail ~/.xsession-errors
istail: cannot open '/home/fdrc/.xsession-errors' for reading: No such file or directory
-
steeldriver over 5 yearsIs your home directory encrypted by any chance?
-
Kaszt over 5 yearsNo, it isn't...
-
Vijay about 5 yearsits too late but maybe of use to some one else. In my 18.04 command
xauth
returnsUsing authority file /run/user/1000/gdm/Xauthority
-
-
brewmanz about 4 years#CAUTION# This destroyed my almost-working GUI into a frozen GUI
-
Elia Weiss almost 4 yearsThe first cmd returns nothing, should I install the driver anyway?
-
openCivilisation almost 3 yearsI also did
apt-get install gdm3
first, this combined with the above advice after worked for me. -
Steven C. Howell about 2 yearsI'm not certain, but I think simply installing
lightdm
(second step) included the reconfigure step. During the installation, I was asked to select betweengdm
andlightdm
, which was the same thing that the reconfigure step did (third step).