mirror of https://codeberg.org/anemofilia/zero
20 lines
427 B
Plaintext
20 lines
427 B
Plaintext
|
#!/bin/sh
|
||
|
set -exu
|
||
|
|
||
|
tty=$(tty)
|
||
|
tty=${tty#/dev/tty}
|
||
|
|
||
|
dir=$(which Xorg)
|
||
|
dir=${dir%/bin/Xorg}
|
||
|
|
||
|
display=0
|
||
|
while [ -e "/tmp/.X$display-lock" ] || [ -S "/tmp/.X11-unix/X$display" ]; do
|
||
|
: "$((display += 1))"
|
||
|
done
|
||
|
display=:$display
|
||
|
|
||
|
"$dir/bin/xinit" -- "$dir/bin/Xorg" "$display" "vt$tty" \
|
||
|
-keeptty \
|
||
|
-configdir "$dir/share/X11/xorg.conf.d" \
|
||
|
-modulepath "$dir/lib/xorg/modules"
|