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.

After about the second/third batch of updates on a fresh install of Ubuntu 12.04, I end up getting stuck in an infinite login loop: I enter my password, screen goes black and shows me the end of the initialisation messages (including things like CUPS initialising), and then the greeter reappears.

Kicker is, as I'm using gnome-shell, I just decided to uninstall LightDM, ubuntu-desktop and unity-greeter, using GDM as my manager, and the problem still happens in exactly the same manner.

I'm lost even as to where to start looking - Xorg logs, LightDM logs (before I removed it), syslog and dmesg logs have held no unusual information at all.

I have a TeX assignment due next week, and reinstalling Ubuntu every time I want to work on it is not going to work (nor is using TeX on Windows ;). Anything else I should try?

share|improve this question

1 Answer 1

up vote 1 down vote accepted

The answer was COMPLETELY unrelated:

I put a function in my /etc/profile for quickly setting proxy settings:

function proxy(){
echo -n "username:"
read -e username
echo -n "password:"
read -es password
export http_proxy="http://$username:$password@proxy: port/"
export ftp_proxy="http://$username:$password@proxy: port/"
echo -n "\nDone."
}

Problem is, /etc/profile is interpreted by dash (/bin/sh), not bash, like I had guessed (it sorta being the default and all). So dash was trying to read function proxy(), but the ( was unexpected, and causing a fatal error - crashing ANY graphic login attempt.

These errors didn't show up when logging in non-graphically, making it VERY hard to discover.

Moral of the story: check your ~/.xsession-errors file.

For clarification:

If you can't login graphically, press 'Ctrl+Alt+F1' to reach a non-gui shell, log in there, and check your ~/.xsession-errors by writing:

cat ~/.xsession-errors
share|improve this answer
    
To clarify what's going on with bash and dash: /bin/bash is the default login shell (the default shell you get when you are using a shell for a command-line interface), whereas /bin/dash (via the /bin/sh symbolic link) is the default shell for automated background script tasks like those that happen automatically when you start Ubuntu up, log in, or shut Ubuntu down. –  Eliah Kagan Jun 3 '12 at 22:02

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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