24

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.

10 Answers 10

11

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
  • 1
    solution 2 seems like the best especially when u change ownership of .Xauthority and it is still not working – Manny265 Jul 11 '16 at 10:11
  • Solution 2 has worked for me always. – Sandeep C Dec 9 '16 at 6:59
  • Solution 2 worked. Thanks!! – Amit Patel Jan 12 at 19:23
3

I have tried all sorts of things from the forums to fix my login loop problem. None of them worked. I ended up figuring out a less than optimal solution, but one that worked (which makes it preferable over everything else I tried). This is what I ended up doing:

Open Virtual Terminal: Ctrl+Alt+F1

Logged in using my user account. It let me log in there, even though it did not in the GUI.

Since none of the other solutions worked, and the most important thing to me was to have a usable account with admin privileges, I did the following:

sudo adduser newusername

You will have to fill out all the details, including password and such. Then, to give it root privileges:

sudo usermod -a -G sudo newusername

Now hit Ctrl+Alt+F7 to switch back to the GUI. You may need to reboot to get everything working properly. The GUI let me log in to the new user I had created.

If you need items from the old user's home folder and it refuses to allow it due to permissions issues, you can open a terminal (or hit Ctrl+Alt+F1 again) and change ownership, thus granting these permissions, with:

chown newusername:oldusername ~oldusername

Note: You may have to decrypt the old user's home folder if you had chosen to encrypt it when you set it up

  • 1
    Note - sometimes CTRL ALT F1 won't work. In that case, try CTRL ALT FN F1. – 智障的人 Aug 29 '15 at 18:12
1

Today I (apparently) experienced the same problem using a system administrator UID. I tried logging in with a non-admin UID on the console. Success. I remotely logged in with the admin UID and this was my session:

Last login: Fri Jul 3 16:55:22 2015 /usr/bin/xauth: /home/kingb/.Xauthority not writable, changes will be ignored kingb@North40:~$ ls -l .Xauthority -rw------- 1 root root 317 7月 2 08:36 .Xauthority

I changed owner and group to the admin user and can now log in with the admin account.

The only thing I can offer which may have caused this is as follows:

  • I was logged in as the above admin user on the console.
  • A few days later I discovered the console session frozen.
  • I found that I could remotely log in as the admin user and rebooted the machine.
  • Days later I experienced the problem that brought me to this page.
  • ls -l .Xauthority for a non-admin user revealed the owner and group inconsistencies.

No telling what actually caused the symptom (frozen console session?) but (for me) the fix was simple enough.

1

I had this issue today on 14.04LTS, but found the root cause to be an issue with permissions on my user directory getting mistakenly altered.

The symptoms for me: Login screen would show up, allow be to login, successfully logged in, started to load, then black screen for a second and back to the login screen. The only thing in vim /var/log/syslog that looked suspect was:

Dec  9 13:50:31 pc-host pulseaudio[5505]: [pulseaudio] core-util.c: Home directory not accessible: Permission denied
Dec  9 13:50:33 pc-host gnome-session[5280]: WARNING: IceLockAuthFile failed: Permission denied

Solution:

  • Press Ctrl+Alt+F6 and log in
  • Run command: sudo chown myusername. /home/myusername
  • Press Ctrl+Alt+F7
0

I had applied the following command from Akshay Pratap as follows:
sudo apt-get install --reinstall ubuntu-desktop

This solved my problem. I think the main problem was that the /boot folder was full and there was a trial to install the latest kernel that was failed due to insufficient space.

As soon as I was able to login I removed the unneeded kernel images by using synaptic to uninstall them. The best practice here is to keep only one version before the current version

P.S.

I am using Ubuntu 14.04 64 bit and I am not sure why the size selection of the /boot directory is too small.

This is always making a problem for me but the symptoms are different based on the package that was failed to install due to the insufficient space.

0

In addition to all other suggestions from many threads about this topic I tried also this:

sudo apt-get install --reinstall ubuntu-session

It was based on this answer and Tim's comment under it.

After that I was able to log in.

0

I'll preface this by saying: installing another desktop environment (I favor XFCE) can help to troubleshoot this as you can use apps that you are familiar with.

When I had this problem, the solution turned out to be incompatible graphics drivers, an answer which was added to the question you linked after you posted this, if I'm reading the dates right.

I was able to get back in business with unity by starting xfce, starting the System Settings app, opening the Software and Updates dialog, switching to the Additional Drivers tab and selecting, in my case, the nouveau driver.

I have also had wifi troubles on a system update where this was the problem. There, too, the open source driver was a good fallback.

-1

I have same problem in 11.04. I solved it by re-installing Compiz.

Open a terminal window. Type, sudo apt-get remove compiz and hit Enter Type your password if requested (nothing will show up for privacy), type Y and hit Enter if it asks you for confirmation When that task is done, or if it failed because it wasn't installed in the first place, type, sudo apt-get install compiz and hit enter/return. Follow the same steps as you did to remove it. Then reboot your machine, hope this helps!

  • 1
    I uninstalled combiz. But still unable to log-in @Ganesh – Anitha Feb 27 '15 at 9:37
-1

I had this problem on Ubuntu 14.04, probably because it's a newinstall and I was adding my personal bits of things.

Eventually, I did a:

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

This installed the gnome shell and I am able to login on all profiles

Then I used the gnome tweak tool, you have to enable icons on the desktop within the tweak tool to see the wallpaper.

-3

to avoid the login loop you can install and use different login manager or use new clean user account in your old login manager,if you want create new clean user account,install another login manager first (example:gdm) via command line if you dont have any,then change your login manager type "sudo dpkg-reconfigure lightdm" then change the login manager to gdm,next login into gdm with your old account,after that search for user account application, make a new account here and dont forget to make the password.after finished change your login manager back to lightdm,then login with your new clean user account.note that your new clean user account will use default setting for your ubuntu.

protected by Community Jan 28 '16 at 20:15

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.