1

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?

0

1 Answer 1

2

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
2
  • 1
    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. Jun 3, 2012 at 22:02
  • Ctrl+Alt+F1 - saved me. Had a Python script executed on start with a infinite loop - couldnt exit until that!
    – tymeJV
    Apr 28, 2016 at 20:38

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .