commit 85295ea37c41735f92b30d6082135887275dd440
parent db4884b0d814de659a75e87cfa9dc33d472a1139
Author: Jan Pobrislo <ccx@webprojekty.cz>
Date: Sat, 25 May 2019 02:02:36 +0200
Service directory with X11 services
Diffstat:
24 files changed, 208 insertions(+), 0 deletions(-)
diff --git a/service/X5/down b/service/X5/down
diff --git a/service/X5/env/vtN b/service/X5/env/vtN
@@ -0,0 +1 @@
+5+
\ No newline at end of file
diff --git a/service/X5/log/run b/service/X5/log/run
@@ -0,0 +1,4 @@
+#!/command/execlineb -P
+s6-envdir ../env
+importas vtN vtN
+s6-log -b -- /var/log/X.${vtN}.logs
diff --git a/service/X5/nosetsid b/service/X5/nosetsid
diff --git a/service/X5/notification-fd b/service/X5/notification-fd
@@ -0,0 +1 @@
+3
diff --git a/service/X5/run b/service/X5/run
@@ -0,0 +1,45 @@
+#!/bin/execlineb -P
+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 {
+ 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
+Xorg
+ -displayfd 5
+ -nolisten local
+ -nolisten tcp
+ -quiet
+ -logfile /dev/stdout
+ -auth ${XDG_RUNTIME_DIR}/Xauthority
+ -tst
+ -retro
+ vt${vtN} :${vtN}
diff --git a/service/X6/down b/service/X6/down
diff --git a/service/X6/env/vtN b/service/X6/env/vtN
@@ -0,0 +1 @@
+6+
\ No newline at end of file
diff --git a/service/X6/log/run b/service/X6/log/run
@@ -0,0 +1,4 @@
+#!/command/execlineb -P
+s6-envdir ../env
+importas vtN vtN
+s6-log -b -- /var/log/X.${vtN}.logs
diff --git a/service/X6/nosetsid b/service/X6/nosetsid
diff --git a/service/X6/notification-fd b/service/X6/notification-fd
@@ -0,0 +1 @@
+3
diff --git a/service/X6/run b/service/X6/run
@@ -0,0 +1,45 @@
+#!/bin/execlineb -P
+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 {
+ 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
+Xorg
+ -displayfd 5
+ -nolisten local
+ -nolisten tcp
+ -quiet
+ -logfile /dev/stdout
+ -auth ${XDG_RUNTIME_DIR}/Xauthority
+ -tst
+ -retro
+ vt${vtN} :${vtN}
diff --git a/service/X7/down b/service/X7/down
diff --git a/service/X7/env/vtN b/service/X7/env/vtN
@@ -0,0 +1 @@
+7+
\ No newline at end of file
diff --git a/service/X7/log/run b/service/X7/log/run
@@ -0,0 +1,4 @@
+#!/command/execlineb -P
+s6-envdir ../env
+importas vtN vtN
+s6-log -b -- /var/log/X.${vtN}.logs
diff --git a/service/X7/nosetsid b/service/X7/nosetsid
diff --git a/service/X7/notification-fd b/service/X7/notification-fd
@@ -0,0 +1 @@
+3
diff --git a/service/X7/run b/service/X7/run
@@ -0,0 +1,45 @@
+#!/bin/execlineb -P
+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 {
+ 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
+Xorg
+ -displayfd 5
+ -nolisten local
+ -nolisten tcp
+ -quiet
+ -logfile /dev/stdout
+ -auth ${XDG_RUNTIME_DIR}/Xauthority
+ -tst
+ -retro
+ vt${vtN} :${vtN}
diff --git a/service/X8/down b/service/X8/down
diff --git a/service/X8/env/vtN b/service/X8/env/vtN
@@ -0,0 +1 @@
+8+
\ No newline at end of file
diff --git a/service/X8/log/run b/service/X8/log/run
@@ -0,0 +1,4 @@
+#!/command/execlineb -P
+s6-envdir ../env
+importas vtN vtN
+s6-log -b -- /var/log/X.${vtN}.logs
diff --git a/service/X8/nosetsid b/service/X8/nosetsid
diff --git a/service/X8/notification-fd b/service/X8/notification-fd
@@ -0,0 +1 @@
+3
diff --git a/service/X8/run b/service/X8/run
@@ -0,0 +1,45 @@
+#!/bin/execlineb -P
+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 {
+ 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
+Xorg
+ -displayfd 5
+ -nolisten local
+ -nolisten tcp
+ -quiet
+ -logfile /dev/stdout
+ -auth ${XDG_RUNTIME_DIR}/Xauthority
+ -tst
+ -retro
+ vt${vtN} :${vtN}