8

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.

Kaszt
  • 395
  • 1
    A 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. – steeldriver Aug 20 '18 at 17:10
  • 1
    Thanks 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 from tail ~/.xsession-errors is tail: cannot open '/home/fdrc/.xsession-errors' for reading: No such file or directory – Kaszt Aug 20 '18 at 17:13
  • Is your home directory encrypted by any chance? – steeldriver Aug 20 '18 at 17:23
  • No, it isn't... – Kaszt Aug 20 '18 at 17:33
  • its too late but maybe of use to some one else. In my 18.04 command xauth returns Using authority file /run/user/1000/gdm/Xauthority – Vijay Mar 23 '19 at 12:54

2 Answers2

3

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
  • I'm not certain, but I think simply installing lightdm (second step) included the reconfigure step. During the installation, I was asked to select between gdm and lightdm, which was the same thing that the reconfigure step did (third step). – Steven C. Howell Mar 02 '22 at 16:01
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
Eliah Kagan
  • 117,780