Debian login loop

I had the same problem using Jessie 8.6 with the kernel 4.7 with cinnamon, and I did almost the same: I just changed the ownership of the /home/user/.Xauthority file and it also worked:

chown user.user ./.Xauthority

After some research, I found an entry at Debian User Forums, where someone had almost the same issue, except that I could use startx and he didn't. The problem was that some of the hidden files inside the users home directory were owned by root. I still don't know why I could start the xserver from command line but at least I can login now with the GUI again.

The solution

I went into the command line using CTRL + ALT+ F1

Then I logged in as root and did a ls inside the home directory of the corrupted user.

cd /home/username -> ls -la

("-la" list hidden files, and the owner of the files)

depending on how many files are owned by root you can change the rights for seperate files, or be lazy like me and do:

chmod a+rwx *

(chmod changes the permissions for a usergroup)

  • "a" means for ALL users (i have just one user on the machine)
  • "+" means to ADD rights
  • "rwx" means read, write and execute
  • and * means all files inside this directory

That means, all users can now read, write (modify) and execute this files.

I know, its maybe not the cleanest solution but it worked for me.


This problem may occur due to corrupted xsession file, fix it by installing lxsession

sudo apt-get install lxsession