Cannot login to X in Debian

After a non destructive partition resizing in Gparted Live CD, I found that my Debian installation which used to work perfectly fine till then wouldnt start X

I would get a graphical login screen, but the moment I entered my username and password, it would take me back to the same login screen.

I tried to diagnose what could possibly have gone wrong. Initially I thought it was an Nvidia driver issue. So I remove and recompiled the Nvidia kernel module with module-assistant (m-a). But the issue persisted.

So I ran the following:

startx -- :1
less /var/log/Xorg.0.log
less /var/log/Xorg.1.log

It gave me an error that:

Couldn't open compiled keymap /var/lib/xkb/server-0.xkm
XKB: Failed to compile keymap

Tracing the issue further I found that one user reported having this issue after he found that /tmp wasnt writable. Sure enough I found that /tmp was root owned and did not have write permissions for others.

So a simple

chmod 777 /tmp

service kdm stop

service kdm restart

 

and KDE configuration popped up, allowing my normal login. As part of the process I lost my KDE4 settings, but that was fine.


You are reading this post on Joel G Mathew’s tech blog. Joel's personal blog is the Eyrie, hosted here.