From 662306a45861ed591e87a6ade748cf77468d89b6 Mon Sep 17 00:00:00 2001 From: Roland Date: Mon, 25 May 2026 20:07:06 -0600 Subject: [PATCH] =?UTF-8?q?Blocking=20lightdm=20until=20wrolpi-bootstrap?= =?UTF-8?q?=20finishes=20=E2=80=94=20fixes=20first-boot=20zenity=20race.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit wrolpi-bootstrap.service is `WantedBy=multi-user.target` and `Before=` the wrolpi-api/app/kiwix/controller services, but had no ordering constraint against lightdm. Systemd was free to start lightdm in parallel with bootstrap, so XFCE autologin would land before bootstrap had written /tmp/wrolpi-firstboot-summary.txt — and the wrolpi-firstboot-notify autostart would fire, find no summary, and exit silently. On the live test this manifested as the user seeing the desktop come up immediately but never seeing the welcome zenity dialog. The notify script's own log confirmed the timing race: ===== Mon May 25 08:01:46 PM UTC 2026 invoked ... ===== no summary file at /tmp/wrolpi-firstboot-summary.txt — nothing to do bootstrap was still in the middle of `pg_createcluster` at 20:01:46 and didn't write the summary file until ~20:01:48. Adding `Before=display-manager.service lightdm.service` makes systemd wait for bootstrap to complete before bringing up the display manager. Tested live by logging out + back in on the running ISO (re-firing autostart with the summary already in place) — the zenity dialog appeared. Co-Authored-By: Claude Opus 4.7 (1M context) --- .../etc/systemd/system/wrolpi-bootstrap.service | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/debian-live-config/config/includes.chroot/etc/systemd/system/wrolpi-bootstrap.service b/debian-live-config/config/includes.chroot/etc/systemd/system/wrolpi-bootstrap.service index 67147ae7..7e329c86 100644 --- a/debian-live-config/config/includes.chroot/etc/systemd/system/wrolpi-bootstrap.service +++ b/debian-live-config/config/includes.chroot/etc/systemd/system/wrolpi-bootstrap.service @@ -2,7 +2,11 @@ Description=WROLPi bootstrap (persistence partition + Postgres bind-mounts + DB) Documentation=https://github.com/lrnselfreliance/wrolpi After=local-fs.target systemd-tmpfiles-setup.service -Before=postgresql.service wrolpi-api.service wrolpi-app.service wrolpi-kiwix.service wrolpi-controller.service wrolpi-first-startup.service wrolpi-mounts.service wrolpi.target +# Block lightdm (and any other display manager) until bootstrap finishes. +# Otherwise XFCE autologin can land before bootstrap has written the +# first-boot summary file, and the wrolpi-firstboot-notify autostart +# fires too early and shows nothing. +Before=postgresql.service wrolpi-api.service wrolpi-app.service wrolpi-kiwix.service wrolpi-controller.service wrolpi-first-startup.service wrolpi-mounts.service wrolpi.target display-manager.service lightdm.service Wants=local-fs.target # live-boot uses one of these mount points depending on version; on # Installed none of them exist and RequiresMountsFor resolves to the