wrolpi/debian-live-config/config/includes.chroot/usr/local/bin/wrolpi-firstboot-notify
lrnselfreliance f644a80c9a
Debian installs create the user the installer asks for (#834)
The ISO's chroot hook created wrolpi as a login user (UID 1000, password
"wrolpi", full sudo, LightDM autologin).  The Debian installer creates the
user it asks for only when no UID 1000-59999 user exists, so it silently
skipped that user: the only login on an installed system was wrolpi/wrolpi,
with SSH and sudo.

wrolpi is now a system account with no password or login sudo, as on every
other WROLPi deployment.  The installer creates the user it asks for (with
sudo, no autologin).  The live session logs in as live-config's "user".
Desktop shortcuts moved to /etc/skel so every user gets them.

check-iso.sh now fails the build when the image has a UID 1000-59999 user.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 18:23:40 -06:00

44 lines
1.6 KiB
Bash
Executable file

#!/bin/sh
# Surface the first-boot bootstrap summary as a zenity dialog once the
# XFCE session is up.
#
# wrolpi-bootstrap.service writes /tmp/wrolpi-firstboot-summary.txt when
# it does notable work (e.g. creates the persistence partition). This
# script —
# autostarted via /etc/xdg/autostart/wrolpi-firstboot-notify.desktop —
# reads it, shows the contents to the user, and removes the file.
#
# /tmp is tmpfs, so the file is naturally per-boot. Uneventful boots
# (where bootstrap was a no-op) leave nothing to display.
#
# Logs every invocation to /tmp/wrolpi-firstboot-notify.log so we can
# tell from a deployed system whether xfce4-session ever fired the
# autostart at all.
set +e # never fail silently; we always want the log line
LOG=/tmp/wrolpi-firstboot-notify.log
exec >>"$LOG" 2>&1
echo "===== $(date) invoked (user=$(id -un) display=${DISPLAY:-?}) ====="
F=/tmp/wrolpi-firstboot-summary.txt
if [ ! -f "$F" ]; then
echo "no summary file at $F — nothing to do"
exit 0
fi
if command -v zenity >/dev/null 2>&1; then
echo "launching zenity..."
zenity --info --width=520 --title="Welcome to WROLPi" --text="$(cat "$F")"
echo "zenity returned $?"
elif command -v notify-send >/dev/null 2>&1; then
echo "zenity missing; falling back to notify-send"
notify-send -t 30000 "WROLPi setup complete" "$(cat "$F")"
fi
# bootstrap.sh writes the summary as root; /tmp's sticky bit means a
# non-root rm fails. Try via sudo (passwordless for the live session's
# user) so the file doesn't survive into another login session.
sudo rm -f "$F" 2>/dev/null || rm -f "$F" 2>/dev/null || true
echo "done"