xenocara/app/xdm/config/GiveConsole
jca 82a7a68ebe Pass sessreg(1) the correct path to the Xservers file.
xdm sessions were erroneously marked as active after being terminated.

Issue noticed and patch by Patrick Keshishian.
ok matthieu@
2015-01-25 21:51:20 +00:00

15 lines
517 B
Bash

#!/bin/sh
# Assign ownership of the console to the invoking user
# $OpenBSD: GiveConsole,v 1.5 2015/01/25 21:51:20 jca Exp $
#
# By convention, both xconsole and xterm -C check that the
# console is owned by the invoking user and is readable before attaching
# the console output. This way a random user can invoke xterm -C without
# causing serious grief.
#
chown $USER /dev/console
if [ -c /dev/drm0 ]; then
chown $USER /dev/drm0
fi
/usr/X11R6/bin/sessreg -a -l $DISPLAY -u none -x /etc/X11/xdm/Xservers $USER