From 5b4c824ada84d161cf1af308fe1ce372b8961460 Mon Sep 17 00:00:00 2001 From: humocs-man <251756307+humocs-man@users.noreply.github.com> Date: Sat, 14 Mar 2026 13:32:35 +0100 Subject: [PATCH] Modify wait-and-run.sh to check for graphical session --- files/etc/skel/.config/firstboot/wait-and-run.sh | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/files/etc/skel/.config/firstboot/wait-and-run.sh b/files/etc/skel/.config/firstboot/wait-and-run.sh index f4540a5..f3ecf7d 100644 --- a/files/etc/skel/.config/firstboot/wait-and-run.sh +++ b/files/etc/skel/.config/firstboot/wait-and-run.sh @@ -1,18 +1,15 @@ #!/usr/bin/env bash set -euo pipefail -# 1. Warten, bis der User‑DBus stabil ist +# Warten, bis wir wirklich in einer grafischen Session sind +until [ -n "${WAYLAND_DISPLAY:-}" ] || [ -n "${DISPLAY:-}" ]; do + sleep 1 +done + +# User‑DBus stabil until busctl --user list >/dev/null 2>&1; do sleep 1 done -# 2. Warten, bis die COSMIC‑Session 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"