2016-10-23 02:30:37 -06:00
|
|
|
#!/bin/sh
|
|
|
|
# Assign ownership of the console to the invoking user
|
2018-07-11 13:20:40 -06:00
|
|
|
# $OpenBSD: GiveConsole,v 1.2 2018/07/11 19:20:40 matthieu Exp $
|
2016-10-23 02:30:37 -06:00
|
|
|
#
|
|
|
|
# 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
|
2018-07-11 13:20:40 -06:00
|
|
|
/usr/X11R6/bin/sessreg -a -l $DISPLAY -u none $USER
|