2

I'm stuck in a login loop because:

  1. My $HOME variable is being set incorrectly when I login. I logged into a shell via ttty1 and echo $HOME returned /usr/local/gradle
  2. .bashrc or .bash_profile isn't being sourced when I log in. I tried setting env HOME=/home/pyler, and set HOME=/home/pyler, logged out then logged back in only to find that $HOME was /usr/local/gradle - again

This pops up whenever I login graphically via unity:

enter image description here

The system then logs me out and I'm back to square one.

When and where exactly is $HOME being set to /usr/local/gradle?

update

Found this line in .xsession-errors

dbus-update-activation-environment: setting HOME=/usr/local/gradle

Question is how do I stop this.

pyler
  • 181

2 Answers2

1

You should make sure the user was not created incorrectly. You can check the /etc/passwd file. It will be the second to last column. You can adjust it with this command:

usermod -d /home/pyler pyler

I'm assuming that the username is pyler based on the information you gave. The first column in /etc/passwd will be the exact username.

d a i s y
  • 5,551
TopHat
  • 4,321
0

So it turns out that lightdm was not sourcing /etc/X11/Xsession so I applied Paul Hebble's fix.

I also had a hunch that xorg or xauth were not working properly so I uninstalled them and installed them.

There was no .xsession file in /home/pyler so I created an empty one and sourced .bashrc to ensure that $HOME was set to /home/pyler before I reboot the system.

I ended up logging in without any major problems.

Thanks to all who helped.

pyler
  • 181