OSDN Git Service

[fix] : Refixed starting x.
authorhayao <shun819.mail@gmail.com>
Mon, 13 Apr 2020 02:10:33 +0000 (11:10 +0900)
committerhayao <shun819.mail@gmail.com>
Mon, 13 Apr 2020 02:10:33 +0000 (11:10 +0900)
channels/xfce/airootfs/etc/skel/.bash_profile
channels/xfce/airootfs/etc/skel/.zprofile

index af99c4c..1bf2f71 100755 (executable)
@@ -4,4 +4,6 @@
 
 [[ -f ~/.bashrc ]] && . ~/.bashrc
 [[ -f ~/.setup.sh ]] && ~/.setup.sh
-[[ -z "${DISPLAY}" && "${XDG_VTNR}" -eq 1 && $(tty) = "/dev/tty1" ]] && exec startx
+if systemctl -q is-active graphical.target && [[ ! $DISPLAY && $XDG_VTNR -eq 1 ]]; then
+  exec startx
+fi
\ No newline at end of file
index f22a024..484873e 100755 (executable)
@@ -3,4 +3,6 @@
 #
 
 [[ -f ~/.setup.sh ]] && ~/.setup.sh
-[[ -z "${DISPLAY}" && "${XDG_VTNR}" -eq 1 && $(tty) = "/dev/tty1" ]] && exec startx
+if systemctl -q is-active graphical.target && [[ ! $DISPLAY && $XDG_VTNR -eq 1 ]]; then
+  exec startx
+fi