This is probably because you have no .xsession file. Xdm's
/usr/lib/X11/xdm/Xsession script, which controls the startup of user
sessions, looks for .xsession instead of .xinitrc (as startx does).
The easiest fix is probably to link them together:
ln -s .xinitrc .xsession
It could also be that your PATH is wrong, so that .xsession can't find
any of the X binaries you've asked for. Or perhaps all the items in
your .xsession end with an ampersand, so none runs in the foreground, and
thus your session ends as soon as it began.
It could also be that your .xsession file needs execute permissions:
chmod +x .xsession
But how can you fix anything if you can't log in? After you type your
name, hit enter, type your password, but don't hit enter -- hit
F1 instead. This gives you a "failsafe" login, with an xterm and no
window manager.
jonh@cs.dartmouth.edu jonh@cs.dartmouth.edu |