parent
42407f0eca
commit
f022d0ca76
2 changed files with 14 additions and 0 deletions
|
|
@ -92,3 +92,6 @@ else
|
||||||
cbatticon --hide-notification &
|
cbatticon --hide-notification &
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Prevent Xorg from being killed by .zlogin
|
||||||
|
touch "/tmp/x_ok"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,18 @@ if [ "$(fgconsole 2>/dev/null)" -eq "1" ]; then
|
||||||
|
|
||||||
# Start X or HW-diags
|
# Start X or HW-diags
|
||||||
if ! fgrep -q "nox" /proc/cmdline; then
|
if ! fgrep -q "nox" /proc/cmdline; then
|
||||||
|
# Kill Xorg after 30 seconds if it doesn't fully initialize
|
||||||
|
(sleep 30s; if ! [[ -f "/tmp/x_ok" ]]; then pkill '(Xorg|startx)'; fi) &
|
||||||
|
|
||||||
|
# Try starting X
|
||||||
startx >/dev/null
|
startx >/dev/null
|
||||||
|
|
||||||
|
# Run Hw-Diags CLI if necessary
|
||||||
|
if ! [[ -f "/tmp/x_ok" ]]; then
|
||||||
|
echo "There was an issue starting Xorg, starting CLI interface..."
|
||||||
|
sleep 2s
|
||||||
|
hw-diags cli
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
hw-diags cli
|
hw-diags cli
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue