1

Ubuntu froze, so I had to perform a hard-reboot. But then when I tried to login, all I see is a brief Nvidia splash screen and then it reloads the login screen. I'm completely locked out of Gnome Shell, my normal GUI. I can still login via a text terminal.

I've seen some similar questions like this and this and this but none of the solutions worked for me. My drive isn't encrypted. My home directory has the right permissions. I tried purging all nvidia packages and reinstalling. Nothing's worked. How do I fix this?

Cerin
  • 6,923

1 Answers1

2

A similar question recommended looking at ~/.xsession_errors to help the diagnosis. There, I found several "syntax error" messages pointing to the file /usr/sbin/lightdm-session. The syntax errors weren't actually in this file, but this is the script that LightDM uses to load my ~/.profile, ~/.bashrc and ~./bash_aliases files after I login. This step was failing, and apparently the result is that LightDM kicks you back to the login screen without any explanation.

Inspecting these files further, it turns out that at the end of my ~./profile I had the lines:

export PATH="$HOME/.rbenv/bin:$PATH"
eval "$(rbenv init -)"

It was the eval command throwing the error, presumably because of some broken or corrupted Ruby install. It's possible I added these lines myself, but I don't remember. Commenting them out allowed me to again login to Gnome Shell.

Cerin
  • 6,923