"Philip A. Roa" wrote: > > Hi everyone, > > I've been wrestling these past few days with Derek Dresser's solution on utmp/wtmp >logging. It's a great way > in recording historical access to the LTSP server (Thanks Jim for putting it on the >LTSP site). However, i can't > seem to let 'who' to work properly so as the number of users currently logged-in is >determined and displayed. > > I noticed too that only the last user who has logged in is recognized as current >(displayed by 'who'). The rest > who haven't logged-out yet seem to disappear from the currently logged-in users. > Phil,
I changed two files to fix this. With these changes, if you are using GDM, `who` will look like this: # who david ws05:0 Mar 1 20:18 (ws05) beth ws02:0 Mar 1 12:08 (ws02) Here are the changes: Put this in /etc/X11/gdm/PreSession/Default: #!/bin/sh if [ -x /usr/bin/X11/sessreg ]; then HOST=`echo $DISPLAY | cut -f1 -d: | cut -d\. -f1` Display=:`echo $DISPLAY | cut -f2 -d:` /usr/bin/X11/sessreg -a -w /var/log/wtmp -u /var/run/utmp -l $HOST$Display -h $HOST $USER fi Put this in /etc/X11/gdm/PostSession/Default: #!/bin/sh if [ -x /usr/bin/X11/sessreg ]; then HOST=`echo $DISPLAY | cut -f1 -d: | cut -d\. -f1` Display=:`echo $DISPLAY | cut -f2 -d:` /usr/bin/X11/sessreg -d -w /var/log/wtmp -u /var/run/utmp -l $HOST$Display -h $HOST $USER fi -David _____________________________________________________________________ Ltsp-discuss mailing list. To un-subscribe, or change prefs, goto: https://lists.sourceforge.net/lists/listinfo/ltsp-discuss For additional LTSP help, try #ltsp channel on irc.openprojects.net