better autostart

This commit is contained in:
rydesun 2020-11-18 18:12:32 +08:00
parent 0aeb174c60
commit 3f3b15f401
2 changed files with 3 additions and 2 deletions

View file

@ -1,2 +1,2 @@
#!/bin/sh
exec /usr/bin/X -nolisten tcp "$@"
exec /usr/bin/Xorg -nolisten tcp -nolisten local -keeptty "$@" vt$XDG_VTNR

View file

@ -1,3 +1,4 @@
# Autostart X
if systemctl -q is-active graphical.target && [[ ! $DISPLAY && $XDG_VTNR -eq 1 ]]; then
xinit -- vt$XDG_VTNR
xinit
fi