Boot splash with the InfoFlow logo instead of the Raspberry Pi one
CI / test-bookworm (push) Failing after 2s
CI / test-latest (push) Successful in 30s

Own plymouth theme (logo centred on white), quiet kernel command line
without boot text, Raspberry logos or cursor, and no firmware rainbow
square. The initramfs is only rebuilt when the theme changes;
uninstall.sh restores the previous theme.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
rothmanandClaude Opus 5.5 committed 2026-11-04 23:19:32 +01:00
1 parent 19595aaf39
commit 4d061f5211
5 files changed
+60 -3

No files matched your search

Binary file not shown.

After

Width:  |  Height:  |  Size: 147 KiB

@@ -0,0 +1,8 @@
[Plymouth Theme]
Name=voxip-kiosk
Description=VoxIP Kiosk boot splash (logo on white)
ModuleName=script
[script]
ImageDir=/usr/share/plymouth/themes/voxip-kiosk
ScriptFile=/usr/share/plymouth/themes/voxip-kiosk/voxip-kiosk.script
@@ -0,0 +1,12 @@
# VoxIP Kiosk boot splash: logo.png centred on white, at most half the screen.
# Replace logo.png (any size, PNG with transparency) for a different logo.
Window.SetBackgroundTopColor(1, 1, 1);
Window.SetBackgroundBottomColor(1, 1, 1);
logo = Image("logo.png");
scale = Math.Min(Window.GetWidth() * 0.5 / logo.GetWidth(), Window.GetHeight() * 0.5 / logo.GetHeight());
if (scale > 1) scale = 1;
logo = logo.Scale(logo.GetWidth() * scale, logo.GetHeight() * scale);
sprite = Sprite(logo);
sprite.SetPosition((Window.GetWidth() - logo.GetWidth()) / 2, (Window.GetHeight() - logo.GetHeight()) / 2, 0);
+34 -3
View File
@@ -95,7 +95,7 @@ pkg_available() { apt-cache policy "$1" 2>/dev/null | grep -q 'Candidate: [0-9]'
"$CHROMIUM" xserver-xorg-core xserver-xorg-input-libinput xserver-xorg-legacy x11-xserver-utils xauth
fonts-dejavu-core fonts-noto-color-emoji
python3 python3-flask python3-argon2 python3-websocket gunicorn
network-manager avahi-daemon iw rfkill iproute2 openssl logrotate sudo kbd
network-manager avahi-daemon iw rfkill iproute2 openssl logrotate sudo kbd plymouth
)
for opt in systemd-zram-generator libraspberrypi-bin raspi-utils-core; do
if pkg_available "$opt"; then PKGS+=("$opt"); fi
@@ -235,14 +235,45 @@ if [[ -f /usr/share/systemd/tmp.mount && ! -e /etc/systemd/system/tmp.mount ]] &
systemctl enable tmp.mount 2>/dev/null || true
fi
# No console blanking (the kiosk runs on vt7, but keep the console awake too).
# Kernel command line: no console blanking (the kiosk runs on vt7, but keep the console
# awake too), and a quiet boot behind the splash: no boot text, Raspberry logos or cursor.
add_cmdline() { # add "key" or "key=value" unless the key is already present
local key="${2%%=*}"
grep -qE "(^| )${key//./\\.}(=[^ ]*)?( |\$)" "$1" || sed -i "1 s/\$/ $2/" "$1"
}
for cmdline in /boot/firmware/cmdline.txt /boot/cmdline.txt; do
if [[ -f $cmdline ]]; then
grep -q 'consoleblank=' "$cmdline" || sed -i '1 s/$/ consoleblank=0/' "$cmdline"
for opt in consoleblank=0 quiet splash plymouth.ignore-serial-consoles logo.nologo vt.global_cursor_default=0; do
add_cmdline "$cmdline" "$opt"
done
config_txt="$(dirname "$cmdline")/config.txt"
# No rainbow square from the firmware. [all] in case the file ends in a model section.
if [[ -f $config_txt ]] && ! grep -q '^disable_splash=' "$config_txt"; then
printf '\n[all]\ndisable_splash=1\n' >> "$config_txt"
fi
break
fi
done
# Boot splash: logo on white (config/plymouth). Rebuilding the initramfs takes a while
# on a Pi 3, so only when the theme changed.
SPLASH_DIR=/usr/share/plymouth/themes/voxip-kiosk
install -d -m 0755 "$SPLASH_DIR"
install -m 0644 "$SRC"/config/plymouth/voxip-kiosk/* "$SPLASH_DIR/"
if [[ ! -f /var/lib/voxip-kiosk/previous-plymouth-theme ]]; then
plymouth-set-default-theme > /var/lib/voxip-kiosk/previous-plymouth-theme 2>/dev/null || true
fi
SPLASH_SUM="$(cat "$SPLASH_DIR"/* | sha256sum | cut -d' ' -f1)"
if [[ "$(plymouth-set-default-theme 2>/dev/null)" != voxip-kiosk || "$(cat /var/lib/voxip-kiosk/splash.sha256 2>/dev/null)" != "$SPLASH_SUM" ]]; then
say "Opstartscherm instellen (initramfs bijwerken, dit duurt even)"
plymouth-set-default-theme voxip-kiosk
if update-initramfs -u -k all >/dev/null 2>&1; then
echo "$SPLASH_SUM" > /var/lib/voxip-kiosk/splash.sha256
else
warn "initramfs bijwerken mislukt; het opstartscherm verschijnt mogelijk pas later tijdens het opstarten."
fi
fi
# A desktop display manager would fight over vt7 and display :0 (Pi OS Desktop images).
# uninstall.sh re-enables the ones recorded here.
for dm in lightdm.service gdm3.service sddm.service; do
+6
View File
@@ -20,6 +20,7 @@ UNITS=(voxip-kiosk-healthcheck.timer voxip-kiosk-healthcheck.service voxip-kiosk
voxip-network-guard.service voxip-boot-import.service)
PREVIOUS_TARGET="$(cat /var/lib/voxip-kiosk/previous-default-target 2>/dev/null || true)"
PREVIOUS_SPLASH="$(cat /var/lib/voxip-kiosk/previous-plymouth-theme 2>/dev/null || true)"
mapfile -t DISABLED_DMS < <(cat /var/lib/voxip-kiosk/disabled-display-managers 2>/dev/null)
echo "==> Services stoppen en verwijderen"
@@ -44,6 +45,11 @@ if [[ -f /etc/X11/Xwrapper.config.voxip-orig ]]; then
else
rm -f /etc/X11/Xwrapper.config
fi
if [[ -d /usr/share/plymouth/themes/voxip-kiosk ]]; then
echo "==> Opstartscherm terugzetten (${PREVIOUS_SPLASH:-text})"
rm -rf /usr/share/plymouth/themes/voxip-kiosk
plymouth-set-default-theme -R "${PREVIOUS_SPLASH:-text}" >/dev/null 2>&1 || true
fi
if [[ -f /etc/systemd/system/display-kiosk.service.voxip-disabled ]]; then
echo " (de eerdere InfoFlow-kioskservice staat nog als display-kiosk.service.voxip-disabled)"
fi