Because this would be security hole, with the current user detection. You can bypass the limitation by adding two lines in xdm config files (which are the same than kdm ones). Note : the S.u.S.E linux distribution includes those lines by default.
Those config files are normally in a directory such as /etc/X11/xdm, or /usr/X11R6/lib/X11/xdm on other systems. The following supposes that they are in /etc/X11/xdm, so you might have to translate them for another directory.
Here is what you have to do : Edit the file Xstartup, or create it, (in the xdm config directory) so that it reads :
#!/bin/sh /etc/X11/xdm/GiveConsole sessreg -a -l $DISPLAY -x /etc/X11/xdm/Xservers $USER |
and the file Xreset so that it reads :
#!/bin/sh /etc/X11/xdm/TakeConsole sessreg -d -l $DISPLAY $USER |
Make sure that xdm-config make reference to those two files:
DisplayManager._0.startup: /etc/X11/xdm/Xstartup DisplayManager._0.reset: /etc/X11/xdm/Xreset |
This will make kdm (or xdm) log the user into utmp, which is the right thing to do. It's not up to kvt, nor xterm, to log the user, but to xdm and kdm, in my opinion. However, this will not log the user as a X user when using startx... Any hint about that ?