mrrl-logincaps

MRRL version of logincaps
git clone https://ccx.te2000.cz/git/mrrl-logincaps
Log | Files | Refs

commit 6bf7a62b47099ee17f4e00558a3eb09f13b053d6
parent 840ac1f5d95fbad775e19fef1cfe608df16235d6
Author: Jan Pobrislo <ccx@webprojekty.cz>
Date:   Tue, 19 Jan 2021 01:57:47 +0100

Unify Xorg start scripts, set ownership of input devices.
Diffstat:
Asbin/service.X.run | 60++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Tservice/X5/run | 0
Tservice/X6/run | 0
Tservice/X7/run | 0
Tservice/X8/run | 0
5 files changed, 60 insertions(+), 0 deletions(-)

diff --git a/sbin/service.X.run b/sbin/service.X.run @@ -0,0 +1,60 @@ +#!/command/execlineb -P +fdmove -c 2 1 +s6-envdir env +importas vtN vtN +export XDG_RUNTIME_DIR /run/service/X${vtN}/data +importas XDG_RUNTIME_DIR XDG_RUNTIME_DIR +if { truncate -s 0 ${XDG_RUNTIME_DIR}/Xauthority } +if { chmod 600 ${XDG_RUNTIME_DIR}/Xauthority } +if { chown xorg:xorg ${XDG_RUNTIME_DIR}/Xauthority } +if { + pipeline { + if { printf "add :%d . " ${vtN} } + if { redirfd -r 0 /dev/urandom xxd -p -l 16 } + } + xauth -f ${XDG_RUNTIME_DIR}/Xauthority source - +} +piperw 4 5 +background -d { + fdclose 5 + if { mkdir -p ${XDG_RUNTIME_DIR}/env } + if { + redirfd -w 1 ${XDG_RUNTIME_DIR}/env/XAUTHORITY + printf "%s/Xauthority" ${XDG_RUNTIME_DIR} + } + if { + fdmove 0 4 + redirfd -w 1 ${XDG_RUNTIME_DIR}/env/DISPLAY + if { printf : } + head -n1 + } + fdmove 1 3 + echo +} +unexport ! +fdclose 4 +fdclose 3 +umask 077 +if { chmod 660 /dev/tty${vtN} } +if { chown root:xorg /dev/tty${vtN} } +if { + elglob dev /dev/input/event* + if { chown root:input ${dev} } + chmod 660 ${dev} +} +redirfd -r 0 /dev/tty${vtN} +redirfd -w 1 /dev/tty${vtN} +s6-setsid +s6-setuidgid xorg +Xorg + -displayfd 5 + -nolisten local + -nolisten tcp + -quiet +# -logfile /dev/stdout + -logfile ${XDG_RUNTIME_DIR}/log + -auth ${XDG_RUNTIME_DIR}/Xauthority + -tst + -retro + -novtswitch + vt${vtN} :${vtN} diff --git a/service/X5/run b/service/X5/run diff --git a/service/X6/run b/service/X6/run diff --git a/service/X7/run b/service/X7/run diff --git a/service/X8/run b/service/X8/run