X.run (1324B)
1 #!/command/execlineb -P 2 fdmove -c 2 1 3 s6-envdir env 4 importas vtN vtN 5 export XDG_RUNTIME_DIR /run/service/X${vtN}/data 6 importas XDG_RUNTIME_DIR XDG_RUNTIME_DIR 7 if { truncate -s 0 ${XDG_RUNTIME_DIR}/Xauthority } 8 if { chmod 600 ${XDG_RUNTIME_DIR}/Xauthority } 9 if { chown xorg:xorg ${XDG_RUNTIME_DIR}/Xauthority } 10 if { chown xorg:xorg ${XDG_RUNTIME_DIR} } 11 if { 12 pipeline { 13 if { printf "add :%d . " ${vtN} } 14 if { redirfd -r 0 /dev/urandom xxd -p -l 16 } 15 } 16 xauth -f ${XDG_RUNTIME_DIR}/Xauthority source - 17 } 18 piperw 4 5 19 background -d { 20 fdclose 5 21 if { mkdir -p ${XDG_RUNTIME_DIR}/env } 22 if { 23 redirfd -w 1 ${XDG_RUNTIME_DIR}/env/XAUTHORITY 24 printf "%s/Xauthority" ${XDG_RUNTIME_DIR} 25 } 26 if { 27 fdmove 0 4 28 redirfd -w 1 ${XDG_RUNTIME_DIR}/env/DISPLAY 29 if { printf : } 30 head -n1 31 } 32 fdmove 1 3 33 echo 34 } 35 unexport ! 36 fdclose 4 37 fdclose 3 38 umask 077 39 if { chmod 660 /dev/tty${vtN} } 40 if { chown root:xorg /dev/tty${vtN} } 41 if { 42 elglob dev /dev/input/event* 43 if { chown root:input ${dev} } 44 chmod 660 ${dev} 45 } 46 redirfd -r 0 /dev/tty${vtN} 47 redirfd -w 1 /dev/tty${vtN} 48 s6-setsid 49 s6-setuidgid xorg 50 Xorg 51 -displayfd 5 52 -nolisten local 53 -nolisten tcp 54 -quiet 55 # -logfile /dev/stdout 56 -logfile ${XDG_RUNTIME_DIR}/log 57 -auth ${XDG_RUNTIME_DIR}/Xauthority 58 -tst 59 -retro 60 -novtswitch 61 vt${vtN} :${vtN}