[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#240880: xdm: doesn't clean utmp entries



On Sun, Mar 28, 2004 at 11:19:14AM +0800, Dan Jacobson wrote:
> Package: xdm
> Version: 4.3.0-7
> Severity: minor
> 
> Looks like who output isn't cleared:
> # invoke-rc.d xdm stop
> # who
> root     tty1         Mar 28 11:11
> jidanni  :0           Mar 28 06:33
> # pstree jidanni
> No processes found.
> -- debconf information:
> * shared/default-x-display-manager: xdm
>   xdm/stop_running_server_with_children: false
>   xdm/daemon_name: /usr/bin/X11/xdm

Yes, oh clueless one... and of course you want to remove the possibility of
cleaning that up, witness bug #239651.  Do you ever keep track of your own
bug reports?

Here you go:

#!/bin/sh
#
# /etc/X11/xdm/Xreset
#
# This script is run as root after the X session ends.

# remove the utmp entry for the session
if grep -qs ^use-sessreg /etc/X11/xdm/xdm.options && command -v sessreg > /dev/null 2>&1; then
  sessreg -d -l $DISPLAY -u /var/run/utmp -x /etc/X11/xdm/Xservers $USER
fi

exit 0

# vim:set ai et sts=2 sw=2 tw=0:

I'm not saying I agree with Branden's decision to unilaterally stop
shipping /etc/X11/xdm/Xreset in order to clean up the xconsole stuff, but
it's not like it's hard to do this yourself.

-- 
 Marc Wilson |     <knghtbrd> Nintendo Declares GCN Most Popular Console
 msw@cox.net |     Ever <knghtbrd> Who are they kidding?  <Mercury>
             |     knghtbrd: Stock holders?



Reply to: