5

Since last week I'm also faced with the endless-loop problem using ubuntu 14.04.3 (installed in dual-boot on HP 840 EliteBook). Upon login the screen turns black and returns to the login interface.I have investigated a couple of things, but I am really stuck. Thus, I would appreciate, if someone could help me out. I have read most of the existing threads, but it seems that most problems were related to certain typos, e.g.

The output of my .xsession-errors is:

/usr/sbin/lightdm-session: line 33: cat: command not found
/usr/sbin/lightdm-session: line 34: truncate: command not found
/usr/sbin/lightdm-session: line 106: ls: command not found
/usr/sbin/lightdm-session: line 117: exec: gnome-session not found

/etc/profile and ~/.bashrc seem to be working fine. When adding 'echo $PATH' to the end of each file, I get following output:

/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games

But after logging into tty-console, the output of the $PATH environment variable is actually empty.

Moreover, I have tried:

  • renaming/removing .Xauthority
  • removing/re-installing/reconfiguring lightdm
  • switching to gdm
  • reinstalling xorg
  • xorg
  • adding a new user,

but the endless-loop effect remained. In addition, I've checked:

  • permissions of tmp (drwxrwxrwt)
  • /etc/environment (contains same path as $PATH above)
  • /var/log/lightdm/lightdm.log (file is empty)
  • .pam_environment (this file does not exist so nothing can be wrong here)

Since I am rather new to ubuntu, I would be grateful for some hints. Thanks in advance for your efforts!

PTler
  • 81

3 Answers3

3

Thanks to the help of terdon, the output of grep -H PATH ~/.profile revealed the login-loop problem:

~/.profile:PATH=/usr/local/bin

instead it should've been:

~/.profile:PATH=/usr/local/bin:$PATH

@terdon, @Braiam: Thanks a lot for your help!

PTler
  • 81
1

Same problem occurred to me so what I did was opened TTL through ctrl+Alt+F1

Then in the terminal enter hostname and password then cat .xsession-errors you will find errors.

In my case, I made some changes on PATH variable file /etc/environment so removing my changes helped me.

Changing .profile or /etc/environment may result in the problem.

Simon Sudler
  • 4,111
1

The answer to modifying the /etc/environment file was helpful. While configuring the minishift, I had changed the /etc/environment by adding PATH variable with a value such as:

PATH=/path_to_minishift/:$PATH

The original PATH variable was retained as it is at the beginning of this file. Hence it seems the only reason I encountered GUI login loop on Ubuntu 18.04 was because of me changing the /etc/environment file. Removing the last added line of PATH, helped me login back again.

Also, from the login screen when I go to the terminal using Ctrl+Alt+F3, I was unable to find any commands such as ls, for everything I have to use /bin/ls full path to the commands. It was very difficult. Hence, one way I found was rebooting and going to 'More options for ubuntu'. In that, there is an option to open the terminal as root, which gives full permission to modify the system. this helped me to change the /etc/environment file.

Eliah Kagan
  • 119,640
Krishna
  • 11