From 85d1250a41bc1bd31246a18bf592c37ceb61ad9c Mon Sep 17 00:00:00 2001 From: humocs-man <251756307+humocs-man@users.noreply.github.com> Date: Sun, 8 Mar 2026 16:09:01 +0100 Subject: [PATCH] added live-mode to setup-Wizard --- files/usr/libexec/cosmic/firstboot-setup.sh | 28 ++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/files/usr/libexec/cosmic/firstboot-setup.sh b/files/usr/libexec/cosmic/firstboot-setup.sh index 62ea639..b2f8b88 100755 --- a/files/usr/libexec/cosmic/firstboot-setup.sh +++ b/files/usr/libexec/cosmic/firstboot-setup.sh @@ -7,13 +7,39 @@ WIDTH=74 LOG="/var/log/firstboot-setup.log" WIZARD_DONE="$HOME/.config/cosmic/firstboot.done" +# ---------------------------- +# Detect live environment +# ---------------------------- +if grep -q 'boot=live' /proc/cmdline; then + LIVE_MODE=yes +else + LIVE_MODE=no +fi + + # ---------------------------- # Run only once # ---------------------------- -if [[ -f "$WIZARD_DONE" ]]; then +if [[ "$LIVE_MODE" == no ]] && [[ -f "$WIZARD_DONE" ]]; then exit 0 fi +if [[ "$LIVE_MODE" == yes ]]; then + $DIALOG --title "COSMIC Live‑Umgebung" --msgbox \ +"Dies ist eine Live‑Vorschau des COSMIC‑Desktops. + +• Änderungen werden nicht gespeichert +• Anwendungen werden hier nicht installiert + +Nach der Installation startet ein +Setup‑Assistent, der bei der Auswahl +von Anwendungen und optionalen Tools +wie Homebrew hilft." \ +$HEIGHT $WIDTH + exit 0 +fi + + exec > >(tee -a "$LOG") 2>&1 abort() {