Modify wait-and-run.sh to check for graphical session

This commit is contained in:
humocs-man
2026-03-14 13:32:35 +01:00
committed by GitHub
parent de2a9df9ed
commit 5b4c824ada
@@ -1,18 +1,15 @@
#!/usr/bin/env bash
set -euo pipefail
# 1. Warten, bis der UserDBus stabil ist
# Warten, bis wir wirklich in einer grafischen Session sind
until [ -n "${WAYLAND_DISPLAY:-}" ] || [ -n "${DISPLAY:-}" ]; do
sleep 1
done
# UserDBus stabil
until busctl --user list >/dev/null 2>&1; do
sleep 1
done
# 2. Warten, bis die COSMICSession wirklich läuft
until pgrep -x cosmic-session >/dev/null; do
sleep 1
done
# 3. Kurze Beruhigungsphase (Panels, Fokus, Autostarts)
sleep 2
# 4. Wizard starten
exec "$HOME/.config/firstboot/firstboot-setup.sh"