Skip to content
Unix Server Solutions
  • Server
  • Apple
  • Database
  • Ubuntu
  • Linux

Ubuntu – ubuntu 14.04 login loop problem

14.04lightdmloginlogin-screen

My Ubuntu 14.04 is stuck when trying to login my desktop. The screen goes black and soon after that the login screen comes back.

I followed all steps in Ubuntu gets stuck in a login loop but the issue was not solved.

Best Answer

You can either create a new user as suggested by ColonelTrogdor or there are other ways to solve this problem. First login into tty by pressing CTRL+ALT+F1

Note: Press ALT+F7 to come out from tty

Solution 1: Reset the Unity and Compiz

  1. Download Unity Reset tool from here.

    Note: It should work with Ubuntu 14.04, 13.10 and 13.04.

  2. Reset Unity using the following command

    $ unity-reset
    

Solution 2 (Most Recommended): Reinstall Ubuntu Desktop (i.e Unity)

sudo apt-get install --reinstall ubuntu-desktop

Solution 3: Install other Desktop Environment like,Gnome, KDE..etc

Now, I suggest you try Gnome Desktop. It also looks cool.

sudo apt-get install gnome-shell ubuntu-gnome-desktop

After trying any solution, just reboot your system.

$ sudo reboot

Related Solutions

Ubuntu – Ubuntu gets stuck in a login loop

Did you end up here after running sudo startx? Nevertheless:

Press Ctrl+Alt+F3 and login into the shell.

Now run ls -lA. If you see the line

-rw-------  1 root root   53 Nov 29 10:19 .Xauthority

then you need to do chown username:username .Xauthority and try logging in (you may also need to do the same for for .ICEauthority).

Else, do ls -ld /tmp. Check for the first 10 letters in the left: they should read exactly so: drwxrwxrwt.

drwxrwxrwt 15 root root 4096 Nov 30 04:17 /tmp

Else, you need to do sudo chmod a+wt /tmp and check again.

If not both, I'd recommend you either

  1. sudo dpkg-reconfigure lightdm
  2. or uninstall, reinstall it.

Now press Alt+→ until you reach the login screen again, and restart.

Ubuntu – Ubuntu 14.04 Login Loop problem after appending .profile file in home folder

I'm guessing you wanted to be able to run commands in your current working directory without typing the prepending ./? Oh well, this is still fixable.

You've only messed up your own user profile, so we can use the root account to repair this damage. First off, you're going to want to boot into recovery mode on your system. From there, select the option that says root, which will drop you into a usable terminal.

From there, you want to cd to your user's home folder (/home/<your username>, the ~ shortcut will not work here). From there, edit your .profile file with something like nano or vi. Delete the line containing:

export PATH= .:$PATH

Be sure to also check .bashrc, .bash_profile and similar files just to be sure. Remove the same line there (if they exist).


If you do want to try this again, be careful to not include spaces in the profile, and be sure to add the . to the end, like so:

export PATH="$PATH":.
Related Question
  • Ubuntu – Ubuntu gets stuck in a login loop
  • Ubuntu – Ubuntu 14.04 Login Loop problem after appending .profile file in home folder