My problem: As you can guess my Ubuntu 12.10 stucks in a login loop when trying to enter my desktop. Means the screen gets black and soon after that the login screen comes back. I’m a Ubuntu Newbie so if there’s any answer please explain in a simply understandable language.
I’ve already read that the problem might be caused by an error depending on the graphics, so I post my graphics to:
My graphics: ATI Radeon 7670M
Press Ctrl+Alt+F3 and login into the shell.
ls -lah. If in the output 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.
ls -ld /tmp. Check for the first 10 letters in the left: they should read exactly so:
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
- or uninstall, reinstall it.
Now press Alt+-> until you reach the login screen again, and restart.
I encountered this exact problem and non of the suggested fixes above worked for me. After almost giving up I looked at the
.xsession-errors and noticed I had a typo in my
.profile (I had an extra
} in the file after I edited it earlier in the day).
That was causing the login loop. It might be another place to look if the other suggested fixes don’t work for you.
Faced the same problem today.
The cause was a bit strange to me.
xubuntu-desktop was removed, so was
ubuntu-desktop. LightDM exited with no error message. Tried lxdm and when I tried to login, it popped up a message saying Xubuntu could not be found.
xubuntu-desktop and it’s fixed now. Think
apt-get autoremove removed the package.
I’ve pressed Ctrl+Alt+F3 and logged into the shell.
Afterwards with this command:
chown username:username .Xauthority
username is my login name, I’ve solved the problem.
Yeah, press ALT+F3. You should be given an unix-style login prompt, so enter your username and password there. From there you should be given a shell (a program that allows you to enter commands, sort of like windows’
cmd.exe). Enter these commands and press ENTER (or Return) after writing each one (you will have to enter your password when it shows something like
[sudo] password for USERNAME. Note that the password will not show when you are typing it!):
sudo apt-get updatesudo apt-get -y dist-upgradesudo apt-get -y install fglrx
Then reboot your computer using this command:
See if this works
If this does not work, try going back to the 3rd terminal (ALT+F3), login, and enter this command (pressing ENTER after you have typed it):
sudo apt-get -y install lxdm
This will show a DOS-like dialog after a bit. If
lxdm is not selected, select it by using the UP and DOWN arrow keys, and press ENTER to accept that selection. Then reboot using the same command as before (
If this still doesn’t work, go back to the 3rd terminal (ALT+F3), login, and enter this command (same procedure):
sudo apt-get -y install lubuntu-desktop
This will install a much lighter desktop environment which should work for now (should enable you to login and use your computer). Once that is done, reboot (
sudo reboot), and when you are confronted with the login page, select the
Lubuntu environment instead of
Change to another login screen.
Ctrl+Alt+F2 to open a terminal.
Ctrl+Alt+F7 to go back to the graphic mode.
sudo dpkg-reconfigure gdm
In a graphic screen, select gdm and OK.
You might be having problems with LightDM, the login manager that comes in Ubuntu by default. In 12.04 it used to do the same problem you are describing.
You can install GDM, an alternative login manager, to get around this:
At the login screen, press and hold Ctrl+Alt+F2 to go to the terminal. Don’t be afraid! Just log in here with your username and password.
sudo apt-get install gdm. Let it install and type
sudo dpkg-reconfigure gdm and follow the prompts to set it as your login manager.
Press Ctrl+Alt+F7 to get back to the login screen which should now look different. Does logging in work? If it does, your problem is solved!
If it doesn’t, go back to the fullscreen terminal and type
sudo dpkg-reconfigure lightdm to set LigthDM as you login manager again. Now you know that this is a problem with your graphics drivers for sure.
I had the same problem after I upgraded to 12.10.Then I came here from Google. I created another user and I could login.
As I don’t use Unity, I uninstalled lighdm. After reboot, I could login. You can try that.
One thing to keep in mind is that if you’re out of space on the system partition all sorts of crazy stuff happens. I just had this very problem, and the cause turned out to be that i only had 227k of space left on /dev/sda1. In fact, running out of disk space has been the cause of many head-scratchers for me. It’s an easy thing to check, so it’s worth ruling out first.
Yes I caused a Login Loop on my main Ubuntu 12.10 user and the fix was simple.
Ubuntu 12.10 is installed in VirtualBox running on Windows 7 and uses Unity.
From the Desktop I Ctrl+Alt+T into terminal mode and then tried to run ‘startx’ (I was trying to help a friend over the phone late at night…but this was a stupid thing to do). A new blank Unity desktop appeared and everything hung…
Forcing VirtualBox to close and then rebooting Ubuntu I got to the login screen but kept looping back to this same screen everytime after entering the password. No errors were displayed. I could login as Guest but I had no Sudo rights and thus no control…
However once logged in as Guest I Ctrl+Alt+F3 and got to a terminal login.
I entered my main user name and password and logged in with command mode. Logout took me back to CLI login and Ctrl+Alt+F7 took me back to Guest desktop. So my account still worked. I then added a test user and gave them sudo rights. From the Unity login I could login and logout Test user with no problem. So Unity still worked.
So my main account was still accessable via CLI and Unity was working for all other accounts. This indicated a configuation problem on my main account. I followed the advice of SiddharthaRT at the top of this post and did
chown username:username .Xauthority. This fixed my problem. Thanks !!
I had the same problem after a clean install of Ubuntu 12.10 (but reusing my existing home partition). I tried all of the other answers, but none worked. But I found the clue to my specific problem in the file .xsession-errors in my home directory.
This is how I solved it in my case:
Hit Ctrl+Alt+F1 to open a virtual terminal. Then login with username and password.
Open the file
~/.xsession-errorsif it exists (type
cat ~/.xsession-errors). In my case, this file contained one single line with an error message:
/usr/sbin/lightdm-session: 27: .: Can’t open /usr/bin/byobu-launch
byobuis a command line tool that I use and I have no idea how that ended up in a system file since this was right after a clean install. Byobu is not installed by default, so that might explain the error as it looks for a file (
/usr/bin/byobu-launch) that doesn’t exist. So in my case I had to install
byobuto fix the problem:
sudo apt-get install byobu
Hit Ctrl+Alt+F7 to go back to the login screen, and login worked fine now.
Of course in your case you might find a different error message in .xsession-errors, which requires a different solution.
Your desktop environment is failing to start (it sounds like). I would start by tring to log in as a different user.
Ctrl+Alt+F1 then login
sudo adduser testing
Once the user has been added ctrl+alt+f7 and try to log in as testing. If you can log in as testing then your unity/gnome configuration is borked and should be reset. This Question covers it. I prefer to
mv ~/.config ~/.config.old.