Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have lubuntu 12.04, and it was working fine until I installed something and I do not remember exactly what I installed because I was trying to build a ruby gem and it required a lot.

now I rebooted and I cannot log in, well, I can but when I do LXDE apparently cannot continue and returns to the login screen.

I created another user from my console screen (I can login there), and the other user can login. So I removed my .* directories from my home directory, but it did not help.

Any suggestions?

share|improve this question
add comment

4 Answers

I had this problem and none of the answers helped. In my case, the clue was in the file ~/.xsession-errors.

The session was bailing because of a failing command in ~/.profile, which occurred due to some nonexistent path.

I commented out the failing line in ~/.profile and was once again able to log in as that user.

Interestingly, an su - to the account from a root shell doesn't reveal the problem for some reason (there is no indication that an command is failing), even though the - argument to su is supposed to behave as if a new login session were created, and so the .profile and other scripts should be read.

share|improve this answer
    
I didn't make myself sufficiently clear. By "su - to the account" what I actually meant was su - kaz not su - to become root. su is not strictly a command for becoming superuser. –  Kaz Mar 29 '13 at 16:22
    
Sorry, that was my mistake in reading. (You did say su - to the account, after all.) –  Eliah Kagan Mar 29 '13 at 16:46
    
I had a file in /etc/profile.d/ folder that was tried to be executed, but failed. Fortunately there was an error log in ~/.xsession-errors so this answer helped me a lot. –  Michal Kováč Jan 23 at 16:58
add comment
up vote 6 down vote accepted

In my case the cause was that ~/.Xauthority was owned by root.

EDIT:

$ ls -l ~/.Xauthority
-rw------- 1 root root 61 Sep 16 15:43 .Xauthority
$ chown group:user ~/.Xauthority
where 'group' and 'user' are the group and the user that you use to login. in my case:
$ chown akonsu:akonsu ~/.Xauthority

share|improve this answer
    
If you could add the commands you used to fix this it could help the next person who has this problem! –  Jorge Castro Sep 16 '12 at 19:31
add comment

I just had the same problem with an upgrade to 12.10. It turns out that the ownership of the files in home had been switched, probably because I used my normal login account when I did the upgrade. i.e.,

all the files in /home/administrator had ownership of {name}:{name}
all the files in /home/{name} had ownership of administrator:administrator

My guess? The account numbers (1001/1002 iirc) had been switched.

Anyway, I ran the following:

sudo chown -R administrator:administrator /home/administrator
sudo chown -R {name}:{name} /home/{name}

where {name} is the name of the account (redacted to protect the innocent)

share|improve this answer
    
Please, keep one of the two chowns, it can confuse people... –  jmendeth Nov 22 '12 at 15:32
add comment

This worked for me (12.10 Lubuntu - can login as guest fine, but logging in as self just keep getting returned to the login screen):

  1. Ctrl + Alt + F1 to get to terminal
  2. sudo passwd > to change password
  3. sudo apt-get install --reinstall xorg
  4. I still can't login at this point, so back to terminal
  5. cd /home/<user> (I think that cd ~ will get you to the same place, instead of type the name of your directory)
  6. sudo mv .Xauthority .XauthorityBak (renaming this file, I don't know why)
  7. Now it works :)

I think the problem may have been caused when I accidentally killed an X-Server process in the Task Mngr before logging out

See also Login screen loops unless you login as Guest

share|improve this answer
add comment

protected by Braiam Jan 23 at 21:00

Thank you for your interest in this question. Because it has attracted low-quality answers, posting an answer now requires 10 reputation on this site.

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.