#!/bin/sh
#
# This script is run as root after any X session ends.

# Remove the utmp entry for the session
if grep -q ^use-sessreg /etc/X11/config
then
  sessreg -d -l $DISPLAY -u /var/log/utmp -x /etc/X11/xdm/Xservers $USER
fi

exit 0
