1

My Ubuntu 14.04 was stuck in a login loop under all profiles including the Guest profile. I do get a terminal session through ssh from another computer, and I can Ctrl-Alt-F3 to a terminal. I tried all the suggestions of re-owning the .Xauthority file and checking if .profiles has not been corrupted. I tried to reinstall lightdm and reconfigured it, and installed gdm but it came up with errors after these commands based on this page:

$ sudo apt-get purge lightdm; sudo apt-get install lightdm
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages will be REMOVED
  lightdm* ubuntu-desktop*
0 to upgrade, 0 to newly install, 2 to remove and 10 not to upgrade.
After this operation, 635 kB disk space will be freed.
Do you want to continue? [Y/n] Y
(Reading database ... 794245 files and directories currently installed.)
Removing ubuntu-desktop (1.325) ...
Removing lightdm (1.10.6-0ubuntu1) ...
Purging configuration files for lightdm (1.10.6-0ubuntu1) ...
Removing user `lightdm' ...
Warning: group `lightdm' has no more members.
userdel: user lightdm is currently used by process 1539
/usr/sbin/deluser: `/usr/sbin/userdel lightdm' returned error code 8. Exiting.
dpkg: error processing package lightdm (--purge):
 subprocess installed post-removal script returned error exit status 1
Processing triggers for man-db (2.6.7.1-1ubuntu1) ...
Errors were encountered while processing:
 lightdm
E: Sub-process /usr/bin/dpkg returned an error code (1)
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following NEW packages will be installed
  lightdm
0 to upgrade, 1 to newly install, 0 to remove and 10 not to upgrade.
Need to get 0 B/108 kB of archives.
After this operation, 573 kB of additional disk space will be used.
Preconfiguring packages ...
Selecting previously unselected package lightdm.
(Reading database ... 794213 files and directories currently installed.)
Preparing to unpack .../lightdm_1.10.6-0ubuntu1_amd64.deb ...
Unpacking lightdm (1.10.6-0ubuntu1) ...
Processing triggers for man-db (2.6.7.1-1ubuntu1) ...
Processing triggers for ureadahead (0.100.0-16) ...
ureadahead will be reprofiled on next reboot
Setting up lightdm (1.10.6-0ubuntu1) ...
Processing triggers for ureadahead (0.100.0-16) ...

After which I need to select the lightdm from the list. It's still stuck in the loop.

and

$ sudo apt-get purge lightdm; sudo apt-get install gdm
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages will be REMOVED
  lightdm*
0 to upgrade, 0 to newly install, 1 to remove and 10 not to upgrade.
After this operation, 573 kB disk space will be freed.
Do you want to continue? [Y/n] Y
(Reading database ... 794242 files and directories currently installed.)
Removing lightdm (1.10.6-0ubuntu1) ...
Purging configuration files for lightdm (1.10.6-0ubuntu1) ...
Removing user `lightdm' ...
Warning: group `lightdm' has no more members.
userdel: user lightdm is currently used by process 1683
/usr/sbin/deluser: `/usr/sbin/userdel lightdm' returned error code 8. Exiting.
dpkg: error processing package lightdm (--purge):
 subprocess installed post-removal script returned error exit status 1
Processing triggers for man-db (2.6.7.1-1ubuntu1) ...
Errors were encountered while processing:
 lightdm
E: Sub-process /usr/bin/dpkg returned an error code (1)
Reading package lists... Done
Building dependency tree       
Reading state information... Done
gdm is already the newest version.
0 to upgrade, 0 to newly install, 0 to remove and 10 not to upgrade.

now I can't even get the gui login and it passes to a flashing screen showing Stopping System V runlevel compatibility.

Trying sudo apt-get install lightdm ubuntu-desktop shows no errors but it's still stuck in the loop.

4
  • Looks like lightdm got (partially) removed, but not reinstalled again because the commands were concatenated with && (means: run the 2nd command only if the 1st command was successful - you should have used ; instead which runs the 2nd command in any case). Try to run sudo apt-get install lightdm ubuntu-desktop and see whether that is able to recover the package.
    – Byte Commander
    Mar 6, 2016 at 12:16
  • I tried this as well as the suggestion of concatenating the commands with ; instead of &&. I have amended the question to include this. It seems like the problem persists. Mar 7, 2016 at 18:13
  • I removed the proprietary graphics card driver using sudo apt-get remove fglrx* which after reboot did not appear to change anything. I then deleted all files starting with .Xauth using sudo rm .Xauth*. Now I can log in to a session but the unity ribbon and status bar are gone. I have all my desktop icons and the background image. I tried to reinstall ubuntu-desktop using sudo apt-get install -reinstall ubuntu-desktop but the problem persists. Mar 7, 2016 at 19:15
  • Okay, I don't know why or how you got into this situation, but the thing you're missing now is Unity. I don't know why it doesn't load, but probably one of the answers to the linked question will work to re-enable it: askubuntu.com/questions/17381/…
    – Byte Commander
    Mar 7, 2016 at 21:18

2 Answers 2

1

After several attempts with no clear solution I have managed to get back to a successful login with a unity launcher session and everything looks fine so far. The steps I took are as follows:

  1. I removed the proprietary graphics card driver using sudo apt-get remove fglrx*. Upon reboot this didn't seem to change anything.
  2. I decided to remove not only the .Xauthority file but all related files using sudo rm .Xauth* after which I could log in but had no unity launcher or status bar etc, only the background and icons.
  3. I tried to reinstall unity and ubuntu-desktop using sudo apt-get install --reinstall unity and sudo apt-get install --reinstall ubuntu-desktop, which also didn't change anything.
  4. I tried to use a graphical method of resetting unity based on this link, which didn't seem to change a thing.
  5. I this same link it states to dconf reset -f /org/compiz/ I got some message to state that the path was not correct, after that using unity --reset-icons &disown seems to have corrected everything and I could log in with a full unity launcher session.
1
  • Oh, nice that you found the solution yourself. Don't forget to accept your own answer (probably there's a delay and you have to wait until tomorrow until the button will get unlocked).
    – Byte Commander
    Mar 7, 2016 at 21:20
-1

Have you recently installed any graphic card drives? I got this error (login loop) too on Ubuntu 15.10 when I was messing around with my drivers.

Try to uninstall the drivers first.

I think this command is for AMD/ATI drivers:

sudo aticonfig --uninstall

If this doesn't fix your problem then I'm sry, you will have to do a fresh install :(

2
  • i have not recently tampered with the graphics card driver. I did a while ago and it didn't give any problems for a while after. At sudo aticonfig --uninstall it comes up with Unable to open /etc/ati/control, please reinstall the driver. aticonfig: No supported adapters detected Mar 6, 2016 at 10:55
  • Well, I don't know what's wrong then...wait for some more answers, but if nothing helps, then you'll have to do a fresh install.
    – Zane
    Mar 6, 2016 at 11:10

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .