Hi,
After some trial and error, I figured out a way to log remote X
terminal sessions to utmp. I am using KDM, but it should be the same
for XDM. My system is Redhat 7.1
First, I edited
/etc/X11/xdm/xdm-config and added the following lines. I put these
at the end of the first section, before the SECURITY section.
DisplayManager*startup: /etc/X11/xdm/Xstartup
DisplayManager*reset: /etc/X11/xdm/Xstartup
This will cause those files to be executed during the beginning and
end of an X session
then you need to create those files to look like
/etc/X11/xdm/Xstartup
***************************
#!/bin/sh
/usr/X11R6/bin/sessreg -a -l $DISPLAY -x /etc/X11/xdm/Xservers $USER
/etc/X11/xdm/Xreset
****************************
#!/bin/sh
/usr/X11R6/bin/sessreg -d -l $DISPLAY -x /etc/X11/xdm/Xservers $USER
next, make sure that those two files are executable
chmod 755 /etc/X11/xdm/Xreset
chmod 755 /etc/X11/xdm/Xstartup
finally, set the sessreg program setuid root
WARNING! : this does have some security implications, make sure you
understand them and accept the risks before doing this.
chmod u+s /usr/X11R6/bin/sessreg
next restart kdm (or xdm if that's what you are using). I think this
is different for GDM, but I don't use that so I'm not sure. You can
simply reboot if you aren't sure how to restart kdm.
HTH,
Derek