Xubuntu 13.04 X Login Loop

All of a sudden, I am no longer able to login to an X session in my Xubuntu 13.04 install. The graphical login accepts my password, the screen goes blank and then returns to the login prompt. A bit of Googling tells me that this isn't an uncommon problem, but all the advice I've read so far hasn't worked:

  • I can login to the guest account, so the login manager is working.
  • I can login to my account via tty or ssh, so my account isn't locked.
  • I can start applications through an X tunnel (XMing+PuTTY), if that's relevant.
  • There's masses of disk space left.
  • My ~/.Xauthority is owned by me, rather than root.
  • There's no reference to ~/.ICEauthority in my logs and the file is otherwise owned by me.
  • /var/log/Xorg.0.log looks OK(ish): There are a few warnings about missing fonts and complaints about psb. Apparently that's the video driver (my laptop uses Intel GMA500) and there are similar complaints later in the file, however it ultimately settles on something. After all, the display is clearly working at the login screen (as it is for the guest account).
  • There are some errors and permission complaints in ~/.xsession-errors, but I'm not sure if they're relevant:

    ERROR:root:Could not find any typelib for Dbusmenu
    ERROR:root:Could not find any typelib for Unity
    ...
    ###!!! [Parent][RPCChannel] Error: Channel error: cannot send/recv
    ...
    debconf: DbDriver "passwords" warning: could not open /var/cache/debconf/passwords.dat: Permission denied
    
  • I tried dpkg-reconfigure xubuntu-desktop and apt-get -y install xubuntu-desktop to try refreshing/reinstalling, but neither option seemed to do anything.

Therefore, I'm kind of at a loss! So any ideas would be most appreciated!


In my case login was possible again after removing $HOME/.Xauthority :

  1. Press <ALT-Control-F1> and you get an ASCII login. Enter username and password.
  2. Type rm .Xauthority. Then you can go back to the graphical login screen by pressing <ALT-Control-F7>.

After taking a closer look it appears that the contents of .Xauthority are destroyed by sshd when login in from a remote machine:

before ssh-ing from a remote machine:

ls -l .Xauthority

rw------- 1 ubuntu ubuntu 50 Nov 24 18:46 .Xauthority

after ssh-ing from a remote machine:

ls -l .Xauthority

-rw------- 1 ubuntu ubuntu 101 Nov 24 19:22 .Xauthority

What can be seen is that the file has an odd number of bytes after the ssh-login.

Maybe there are more programs besides sshd that damage .Xauthority.


The following solved the problem:

mv ~/.config ~/.config.old

So it looks like the problem was with some desktop setting, somewhere.

Now, of course, my desktop is reset for apparently no good reason. Is there an easy way to find the corrupted config file(s)?