From 8b1abd104c502abaa73a3e2f5563f70e3b8e5c8d Mon Sep 17 00:00:00 2001 From: Roland Date: Sun, 24 May 2026 15:51:21 -0600 Subject: [PATCH] Polishing the combined ISO: audio, WiFi, installer launcher. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Three classes of UX gaps surfaced when test-booting the previous build: Audio silent. --apt-recommends false stripped task-xfce-desktop's recommend chain, which is what normally pulls the PulseAudio server. We only had the panel plugin + client libs. Adding pulseaudio + pulseaudio-utils + pavucontrol + alsa-utils explicitly. No WiFi UI. NetworkManager daemon was running and could see the radio, but network-manager-gnome (nm-applet) wasn't pulled by recommends either. Adding it explicitly. Desktop "Install WROLPi" icon does nothing. Two missing pieces stacked: (a) xfdesktop's launch path needs gvfs (for metadata::trusted) and tumbler (thumbnail dispatch raises a GLib critical without it). (b) Even when xfdesktop dispatches, pkexec can't authenticate without a registered GUI polkit agent — task-xfce- desktop's recommend chain would have provided one, but it didn't, so pkexec falls back to a TTY agent that fails in a Thunar-spawned process (no /dev/tty). Adding gvfs, lxpolkit, tumbler. Rewrites the desktop launcher as Type=Link (skips the executable-trust check entirely) and ships a session autostart that gio-sets metadata::trusted + metadata::xfce-exe-checksum so xfdesktop accepts user-owned .desktop files. Also fixes a Calamares FATAL on boot: branding.desc requires a slideshow key even when there's no real slideshow content; ships a minimal show.qml that just renders the WROLPi logo + a welcome line. Also adds xfce4-notifyd and xfce4-power-manager to desktop.list.chroot — not directly tied to the three issues above, but obvious omissions from the same recommend-stripped XFCE install. Co-Authored-By: Claude Opus 4.7 (1M context) --- .../hooks/normal/9999-wrolpi.hook.chroot | 35 ++++++++++++--- .../calamares/branding/wrolpi/branding.desc | 7 +-- .../etc/calamares/branding/wrolpi/show.qml | 44 +++++++++++++++++++ .../wrolpi-trust-install-icon.desktop | 8 ++++ .../usr/local/bin/wrolpi-trust-install-icon | 22 ++++++++++ .../config/package-lists/desktop.list.chroot | 2 + .../config/package-lists/wrolpi.list.chroot | 8 ++++ 7 files changed, 116 insertions(+), 10 deletions(-) create mode 100644 debian-live-config/config/includes.chroot/etc/calamares/branding/wrolpi/show.qml create mode 100644 debian-live-config/config/includes.chroot/etc/xdg/autostart/wrolpi-trust-install-icon.desktop create mode 100755 debian-live-config/config/includes.chroot/usr/local/bin/wrolpi-trust-install-icon diff --git a/debian-live-config/config/hooks/normal/9999-wrolpi.hook.chroot b/debian-live-config/config/hooks/normal/9999-wrolpi.hook.chroot index c1b64f2f..17449061 100644 --- a/debian-live-config/config/hooks/normal/9999-wrolpi.hook.chroot +++ b/debian-live-config/config/hooks/normal/9999-wrolpi.hook.chroot @@ -206,17 +206,38 @@ autologin-user-timeout=0 autologin-session=xfce EOF -# Calamares launcher on the user's desktop. XFCE shows .desktop files -# placed in ~/Desktop; we use the upstream install-debian wrapper script -# (pulled in by calamares-settings-debian) but rebrand the launcher entry. -# Marked executable so XFCE will launch it without a "trusted application" -# warning. Cleanup of this file on the installed system is handled by -# the shellprocess Calamares module (see etc/calamares/modules/shellprocess.conf). +# Calamares launcher on the user's desktop. +# +# Written as a Type=Link rather than Type=Application: a Type=Application +# .desktop file under ~/Desktop is subject to XFCE Bookworm's "trusted +# launcher" check (metadata::trusted, metadata::xfce-exe-checksum) and +# silently refuses to launch if the metadata isn't set in the user's +# session at click time. Type=Link bypasses that check entirely — XFCE +# just opens the URL via xdg-open, which dispatches to the upstream +# install-debian.desktop in /usr/share/applications/, which runs the +# install-debian wrapper. Cleanup of this file on the installed system +# is handled by the shellprocess Calamares module (see +# etc/calamares/modules/shellprocess.conf). mkdir -p /home/wrolpi/Desktop -cp /usr/share/applications/install-debian.desktop /home/wrolpi/Desktop/install-wrolpi.desktop +cat > /home/wrolpi/Desktop/install-wrolpi.desktop <<'EOF' +[Desktop Entry] +Type=Link +Name=Install WROLPi to disk +Comment=Install WROLPi onto this computer's internal drive +Icon=install-debian +URL=/usr/share/applications/install-debian.desktop +EOF chmod +x /home/wrolpi/Desktop/install-wrolpi.desktop chown -R wrolpi:wrolpi /home/wrolpi/Desktop +# Suppress the upstream calamares-settings-debian autostart that runs +# add-calamares-desktop-icon at every login. Without this it would drop +# a second "Install Debian" .desktop next to ours (and on the system we +# tested with, that copy came out as a 0-byte file for unclear reasons). +# It would also be removed anyway with calamares-settings-debian +# post-install via Calamares' packages module. +rm -f /etc/xdg/autostart/calamares-desktop-icon.desktop + # Drop the default Postgres cluster created by the postgresql-* package. # wrolpi-bootstrap.service creates a fresh cluster on /media/wrolpi/config/postgresql # at first boot regardless of deployment shape; the cluster files installed diff --git a/debian-live-config/config/includes.chroot/etc/calamares/branding/wrolpi/branding.desc b/debian-live-config/config/includes.chroot/etc/calamares/branding/wrolpi/branding.desc index ac06a96f..ff12994a 100644 --- a/debian-live-config/config/includes.chroot/etc/calamares/branding/wrolpi/branding.desc +++ b/debian-live-config/config/includes.chroot/etc/calamares/branding/wrolpi/branding.desc @@ -25,9 +25,10 @@ images: productIcon: "wrolpi-logo.png" productWelcome: "wrolpi-logo.png" -# Slideshow omitted — the upstream Debian slideshow doesn't ship with the -# WROLPi branding, and producing our own QML is deferred polish. Calamares -# falls back to a static welcome screen. +# Calamares fails to start without a slideshow key, even if there is no +# real slideshow content to show. show.qml renders the WROLPi logo + a +# single welcome line during the install. +slideshow: "show.qml" style: sidebarBackground: "#5d2961" diff --git a/debian-live-config/config/includes.chroot/etc/calamares/branding/wrolpi/show.qml b/debian-live-config/config/includes.chroot/etc/calamares/branding/wrolpi/show.qml new file mode 100644 index 00000000..c45f5c28 --- /dev/null +++ b/debian-live-config/config/includes.chroot/etc/calamares/branding/wrolpi/show.qml @@ -0,0 +1,44 @@ +/* Single-slide Calamares slideshow for WROLPi. + * + * Calamares treats the `slideshow:` key in branding.desc as required; + * omitting it produces a FATAL error. Until we have proper WROLPi + * slideshow art, this minimal QML just shows our logo + a welcome line + * during the install. + * + * Adapted from calamares-settings-debian (GPLv3+), which carries the + * upstream Debian Live presentation. + */ + +import QtQuick 2.0; +import calamares.slideshow 1.0; + +Presentation +{ + id: presentation + + Timer { + interval: 20000 + repeat: true + onTriggered: presentation.goToNextSlide() + } + + Slide { + Image { + id: background1 + source: "wrolpi-logo.png" + width: 320; height: 320 + fillMode: Image.PreserveAspectFit + anchors.centerIn: parent + } + Text { + anchors.horizontalCenter: background1.horizontalCenter + anchors.top: background1.bottom + text: qsTr("Welcome to WROLPi.
"+ + "The rest of the installation is automated and should complete in a few minutes.") + wrapMode: Text.WordWrap + width: 600 + horizontalAlignment: Text.Center + } + } + +} diff --git a/debian-live-config/config/includes.chroot/etc/xdg/autostart/wrolpi-trust-install-icon.desktop b/debian-live-config/config/includes.chroot/etc/xdg/autostart/wrolpi-trust-install-icon.desktop new file mode 100644 index 00000000..cdb90d78 --- /dev/null +++ b/debian-live-config/config/includes.chroot/etc/xdg/autostart/wrolpi-trust-install-icon.desktop @@ -0,0 +1,8 @@ +[Desktop Entry] +Type=Application +Name=WROLPi Install Icon Trust +Comment=Mark the install launcher as trusted so xfdesktop will execute it +Exec=/usr/local/bin/wrolpi-trust-install-icon +StartupNotify=false +NoDisplay=true +X-KDE-autostart-phase=1 diff --git a/debian-live-config/config/includes.chroot/usr/local/bin/wrolpi-trust-install-icon b/debian-live-config/config/includes.chroot/usr/local/bin/wrolpi-trust-install-icon new file mode 100755 index 00000000..50365ac0 --- /dev/null +++ b/debian-live-config/config/includes.chroot/usr/local/bin/wrolpi-trust-install-icon @@ -0,0 +1,22 @@ +#!/bin/sh +# Mark /home/$USER/Desktop/install-wrolpi.desktop as trusted so XFCE +# Bookworm's xfdesktop will execute the launcher instead of handing it to +# panel-desktop-handler.desktop (which silently tries to add the file as +# a panel launcher and never runs it). +# +# Runs at user session start via /etc/xdg/autostart/. Requires gvfs (for +# the metadata service that gio talks to); the package list pulls it in +# explicitly because we build with --apt-recommends false and the default +# XFCE recommend chain would have provided it. + +set -eu + +F="$HOME/Desktop/install-wrolpi.desktop" +[ -f "$F" ] || exit 0 + +gio set --type=string "$F" metadata::trusted true || : +gio set --type=string "$F" metadata::xfce-exe-checksum \ + "$(sha256sum "$F" | cut -d' ' -f1)" || : + +# Nudge xfdesktop to re-read the icon's state. +touch "$F" diff --git a/debian-live-config/config/package-lists/desktop.list.chroot b/debian-live-config/config/package-lists/desktop.list.chroot index 40217045..7cd781dc 100644 --- a/debian-live-config/config/package-lists/desktop.list.chroot +++ b/debian-live-config/config/package-lists/desktop.list.chroot @@ -2,3 +2,5 @@ task-xfce-desktop task-ssh-server user-setup plymouth-themes +xfce4-notifyd +xfce4-power-manager diff --git a/debian-live-config/config/package-lists/wrolpi.list.chroot b/debian-live-config/config/package-lists/wrolpi.list.chroot index f4b179d4..175a3341 100644 --- a/debian-live-config/config/package-lists/wrolpi.list.chroot +++ b/debian-live-config/config/package-lists/wrolpi.list.chroot @@ -1,3 +1,4 @@ +alsa-utils apt-transport-https aria2 autoconf @@ -30,6 +31,7 @@ git git-doc gnupg-agent gpsd +gvfs hostapd htop iotop @@ -53,16 +55,21 @@ libssl-dev libtiff5-dev libtool libxml2-dev +lxpolkit netcat-openbsd network-manager +network-manager-gnome nicstat nodejs npm ntfs-3g parted +pavucontrol pkg-config postgresql-15 postgresql-doc +pulseaudio +pulseaudio-utils pv python3-dev python3-doc @@ -78,6 +85,7 @@ sysstat tar tcpdump tmux +tumbler unrar-free unzip vim