summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorMatthieu Herrb <matthieu@cvs.openbsd.org>2021-08-30 15:38:28 +0000
committerMatthieu Herrb <matthieu@herrb.eu>2021-08-30 20:41:27 +0200
commit4fa5bb88de05a7af4acd4a96f0185a2b55264844 (patch)
treeda1a4130d8c3be99f45d00deeafa843f11ca9f19 /config
parent2da2e9923a5ec3641444ea0bd5f0fab508b3aeea (diff)
Generate all the config scripts to avoid hard-coding /usr/X11R6.HEADmaster
This was already done partially.
Diffstat (limited to 'config')
-rw-r--r--config/GiveConsole.in (renamed from config/GiveConsole)7
-rw-r--r--config/TakeConsole.in (renamed from config/TakeConsole)7
-rw-r--r--config/Xsetup_016
-rw-r--r--config/Xsetup_0.in19
4 files changed, 29 insertions, 20 deletions
diff --git a/config/GiveConsole b/config/GiveConsole.in
index 60e568b..c282997 100644
--- a/config/GiveConsole
+++ b/config/GiveConsole.in
@@ -1,12 +1,15 @@
#!/bin/sh
# Assign ownership of the console to the invoking user
-# $OpenBSD: GiveConsole,v 1.4 2021/02/12 10:33:34 jsg Exp $
+# $OpenBSD: GiveConsole.in,v 1.1 2021/08/30 15:38:27 matthieu 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.
#
+prefix="@prefix@"
+exec_prefix="@exec_prefix@"
+
chown $USER /dev/console
if [ -c /dev/drm0 ]; then
chown $USER /dev/drm0
@@ -20,4 +23,4 @@ fi
if [ -c /dev/dri/renderD128 ]; then
chown $USER /dev/dri/renderD128
fi
-/usr/X11R6/bin/sessreg -a -l $DISPLAY -u none $USER
+@bindir@/sessreg -a -l $DISPLAY -u none $USER
diff --git a/config/TakeConsole b/config/TakeConsole.in
index cf649f9..d5448d5 100644
--- a/config/TakeConsole
+++ b/config/TakeConsole.in
@@ -1,8 +1,11 @@
#!/bin/sh
# Reassign ownership of the console to root, this should disallow
# assignment of console output to any random users's xterm
-# $OpenBSD: TakeConsole,v 1.5 2021/02/12 10:33:34 jsg Exp $
+# $OpenBSD: TakeConsole.in,v 1.1 2021/08/30 15:38:27 matthieu Exp $
#
+prefix="@prefix@"
+exec_prefix="@exec_prefix@"
+
chown root /dev/console
chmod 622 /dev/console
if [ -c /dev/drm0 ]; then
@@ -17,4 +20,4 @@ fi
if [ -c /dev/dri/renderD128 ]; then
chown root /dev/dri/renderD128
fi
-/usr/X11R6/bin/sessreg -d -l $DISPLAY -u none $USER
+@bindir@/sessreg -d -l $DISPLAY -u none $USER
diff --git a/config/Xsetup_0 b/config/Xsetup_0
deleted file mode 100644
index dfb3e4e..0000000
--- a/config/Xsetup_0
+++ /dev/null
@@ -1,16 +0,0 @@
-#!/bin/sh
-# $OpenBSD: Xsetup_0,v 1.8 2020/07/04 13:32:50 matthieu Exp $
-
-xsetroot -fg \#6f6f6f -bg \#bfbfbf -bitmap /usr/X11R6/include/X11/bitmaps/root_weave
-
-xconsole -geometry 480x130-0-0 -daemon -notify -verbose -fn fixed -exitOnFail
-
-# install package openbsd-backgrounds
-# then uncomment:
-#
-# if test -x /usr/local/bin/openbsd-wallpaper
-# then
-# /usr/local/bin/openbsd-wallpaper
-# fi
-
-# sxpm OpenBSD.xpm &
diff --git a/config/Xsetup_0.in b/config/Xsetup_0.in
new file mode 100644
index 0000000..8e77edf
--- /dev/null
+++ b/config/Xsetup_0.in
@@ -0,0 +1,19 @@
+#!/bin/sh
+# $OpenBSD: Xsetup_0.in,v 1.1 2021/08/30 15:38:27 matthieu Exp $
+
+prefix="@prefix@"
+exec_prefix="@exec_prefix@"
+
+@bindir@/xsetroot -fg \#6f6f6f -bg \#bfbfbf -bitmap @includedir@/X11/bitmaps/root_weave
+
+@bindir@/xconsole -geometry 480x130-0-0 -daemon -notify -verbose -fn fixed -exitOnFail
+
+# install package openbsd-backgrounds
+# then uncomment:
+#
+# if test -x /usr/local/bin/openbsd-wallpaper
+# then
+# /usr/local/bin/openbsd-wallpaper
+# fi
+
+# sxpm OpenBSD.xpm &