0

Let me put you in context, you see this is the third time I install ubuntu on my laptop (Asus Laptop, running NVDIA GTX 1050), althought this installation was different because I once for all removed the original Windows 10 that came with my Laptop.

My first attempts were on Ubuntu 18.04 LTS and were in a dual booting manner yet I did not had a great time, you see I ran into the login-loop problem twice!, some fellas of mine told me that the reason of it might have been because Ubuntu 18.04 was not the kindest with NVDIA graphics card, anyways I never knew exactly how did I got involved with the login loop problem and I never solved it even tho I did try many posible solutions.

6 months has passed since the last attempts and yesterday in my insanity I installed Ubuntu 19.10 for good throwing Windows away, since I heard that Ubuntu 19.10 fixed the problems with NVDIA graphics and so far I have no problems with it, Im actually happy and amazed, it runs so smoothly.

But deep inside im scared of the login loop curse that i have, does any of you guys know how to PREVENT the login loop from happening, what causes the login loop?

2 Answers2

0

One of the most common things that can cause a login loop is the use of sudo to start a graphic application... like:

sudo gedit filename

The way to prevent this is to use sudo -H... like:

sudo -H gedit filename.

See man sudo for more details about -H.

And because of this, what can happen is that these two files get changed to root ownership... and you get a login loop.

ls -al .*authority

-rw------- 1 username username 451352 Nov  2 13:34 .ICEauthority
-rw------- 1 username username     58 Jun 23  2017 .Xauthority

Then you would have to boot into Recovery Mode, and manually set the file ownership back to the proper username using the sudo chown command.

Update #1:

Instead of booting into Recovery Mode, an alternate way is you can simply go to another virtual console (e.g., Ctrl+Alt+F2 to go to tty2), log in there, run ls -l to see what files are affected, and then run whatever sudo chown ... command is appropriate.

heynnema
  • 73,649
-1

Changing the file /etc/fstab if you dont know exactly what you are doing would give you the login loop, if you're looking for causes, but I think you are more into preventing the login loop at all, and I think you can never know for sure. Don't be discouraged tho there is a way to avoid it and that is everytime you're going to touch some config file or system file, cp the file into a file.old and that way if you get the login loop you just have to press Ctrl+Alt+F3 in the login screen and revert the change you did using the shell.

Wonky
  • 321
  • 1
  • 3
  • 12