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.
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 runsudo apt-get install lightdm ubuntu-desktop
and see whether that is able to recover the package.;
instead of&&
. I have amended the question to include this. It seems like the problem persists.sudo apt-get remove fglrx*
which after reboot did not appear to change anything. I then deleted all files starting with .Xauth usingsudo 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 usingsudo apt-get install -reinstall ubuntu-desktop
but the problem persists.