I have one machine (my main desktop, as it happens) where I've been unable to login from the display manager for months. As soon as I enter my password, it looks like it's about to start my session but then immediately exits and returns to the login prompt.
This happens no matter what display manager I use (i've tried several), or what session type I try (my usual is xfce, but I've tried lxde, kde, and others). At first I suspected it might have something to do with the creeping systemd-ification of everything desktop-related, but it happens whether I select sysvinit or systemd from the grub boot menu.
Logging in on a text console and running
startx works perfectly.
My guess is that there's something in one of the xinit / xsession scripts that's exiting with a non-zero exit code, and
set -e is killing the session.
This machine has been continuously upgraded (both hardware and software) since the mid 1990s, so there's a LOT of cruft. I don't want to rebuild the machine from scratch (that would be far too much work, getting everything set up again), but would like to fix this annoyance.
Any ideas on how to debug this? I've tried adding
exec &> /tmp/Xsession.log and
set -x to
/etc/X11/Xsession but all I get is an empty log file.
BTW, the problem is not in my (equally old and crufty) dot-files, I created a new account
cas2 and get the same problem logging in with that user. Or any other user on the system.
If I move
cas2's home directory out of the way and give it a new, completely empty home directory, then logging in as cas2 gives me:
# find /home/cas2 /home/cas2 /home/cas2/.Xauthority /home/cas2/.cache /home/cas2/.cache/keyring-1L2ROY /home/cas2/.cache/keyring-1L2ROY/control /home/cas2/.xsession-errors # ps u U cas2 USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND cas2 15145 0.0 0.0 131040 2920 ? Sl 20:22 0:00 /usr/bin/gnome-keyring-daemon --daemonize --login
the keyring daemon auto-kills itself not long after that.