carbon-s6-rc

Source directory for s6-rc database on Carbon
git clone https://ccx.te2000.cz/git/carbon-s6-rc
Log | Files | Refs

commit cf87dc7f530a7f819ff7ee2b3fb7980dcb0edc53
parent 7355e597b1c06134ffd5118653120c408692ab66
Author: ccx <root@dorje.wpr.cz>
Date:   Fri,  5 Mar 2021 00:37:26 +0100

Try to port over the Xorg scripts from logincaps repo

Diffstat:
A.scripts/X.run | 61+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
DX5/env | 2--
AX5/env/vtN | 2++
MX5/run | 4++--
DX6/env | 2--
AX6/env/vtN | 2++
MX6/run | 4++--
DX7/env | 2--
AX7/env/vtN | 2++
MX7/run | 4++--
DX8/env | 2--
AX8/env/vtN | 2++
MX8/run | 4++--
13 files changed, 77 insertions(+), 16 deletions(-)

diff --git a/.scripts/X.run b/.scripts/X.run @@ -0,0 +1,61 @@ +#!/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 { chown xorg:xorg ${XDG_RUNTIME_DIR} } +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/X5/env b/X5/env @@ -1 +0,0 @@ -/usr/local/bzr/logincaps/service/X5/env- \ No newline at end of file diff --git a/X5/env/vtN b/X5/env/vtN @@ -0,0 +1 @@ +5+ \ No newline at end of file diff --git a/X5/run b/X5/run @@ -1 +1 @@ -/usr/local/bzr/logincaps/service/X5/run- \ No newline at end of file +../.scripts/X.run+ \ No newline at end of file diff --git a/X6/env b/X6/env @@ -1 +0,0 @@ -/usr/local/bzr/logincaps/service/X6/env- \ No newline at end of file diff --git a/X6/env/vtN b/X6/env/vtN @@ -0,0 +1 @@ +6+ \ No newline at end of file diff --git a/X6/run b/X6/run @@ -1 +1 @@ -/usr/local/bzr/logincaps/service/X6/run- \ No newline at end of file +../.scripts/X.run+ \ No newline at end of file diff --git a/X7/env b/X7/env @@ -1 +0,0 @@ -/usr/local/bzr/logincaps/service/X7/env- \ No newline at end of file diff --git a/X7/env/vtN b/X7/env/vtN @@ -0,0 +1 @@ +7+ \ No newline at end of file diff --git a/X7/run b/X7/run @@ -1 +1 @@ -/usr/local/bzr/logincaps/service/X7/run- \ No newline at end of file +../.scripts/X.run+ \ No newline at end of file diff --git a/X8/env b/X8/env @@ -1 +0,0 @@ -/usr/local/bzr/logincaps/service/X8/env- \ No newline at end of file diff --git a/X8/env/vtN b/X8/env/vtN @@ -0,0 +1 @@ +8+ \ No newline at end of file diff --git a/X8/run b/X8/run @@ -1 +1 @@ -/usr/local/bzr/logincaps/service/X8/run- \ No newline at end of file +../.scripts/X.run+ \ No newline at end of file