mirror of
https://github.com/screentinker/screentinker.git
synced 2026-08-16 07:13:12 -06:00
fix(pi-setup): portable Chromium package name (chromium-browser | chromium) (#183)
raspberry-pi-setup.sh bundled `chromium-browser` into the X11 apt-get install. That package name only exists on Raspberry Pi OS / Ubuntu; on Debian it's `chromium`, so the combined install hard-failed and `set -e` aborted the whole installer on any Debian-based player. Split Chromium out of the bundle into an install_chromium() helper that tries `chromium-browser` then falls back to `chromium` (no-op if already present). CHROMIUM_BIN detection already resolved either binary. Found by running the installer end-to-end on a Debian arm64 VM (QEMU) standing in for a Pi. Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
87a1e02ff3
commit
b127ff5014
|
|
@ -229,19 +229,28 @@ fi
|
||||||
# 5. Kiosk display packages
|
# 5. Kiosk display packages
|
||||||
# ============================================================
|
# ============================================================
|
||||||
log "Installing kiosk packages..."
|
log "Installing kiosk packages..."
|
||||||
|
# Chromium's package name differs by distro: Raspberry Pi OS / Ubuntu ship
|
||||||
|
# 'chromium-browser', Debian ships 'chromium'. Try the Pi/Ubuntu name first, then
|
||||||
|
# fall back to Debian's, so a bundled apt-get can't hard-fail (set -e) on a
|
||||||
|
# Debian-based player. No-op if a chromium is already present.
|
||||||
|
install_chromium() {
|
||||||
|
if command -v chromium-browser &>/dev/null || command -v chromium &>/dev/null; then
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
apt-get install -y -qq chromium-browser >> "$LOG_FILE" 2>&1 || \
|
||||||
|
apt-get install -y -qq chromium >> "$LOG_FILE" 2>&1
|
||||||
|
}
|
||||||
if [ "$HAS_DESKTOP" = false ]; then
|
if [ "$HAS_DESKTOP" = false ]; then
|
||||||
# Lite: install X11 + Chromium from scratch
|
# Lite: install X11 + helpers, then Chromium (portable package name)
|
||||||
apt-get install -y -qq \
|
apt-get install -y -qq \
|
||||||
xserver-xorg x11-xserver-utils xinit \
|
xserver-xorg x11-xserver-utils xinit \
|
||||||
chromium-browser \
|
|
||||||
unclutter xdotool \
|
unclutter xdotool \
|
||||||
>> "$LOG_FILE" 2>&1
|
>> "$LOG_FILE" 2>&1
|
||||||
|
install_chromium
|
||||||
else
|
else
|
||||||
# Desktop: X already running, just ensure Chromium + helpers
|
# Desktop: X already running, just ensure Chromium + helpers
|
||||||
apt-get install -y -qq unclutter xdotool >> "$LOG_FILE" 2>&1
|
apt-get install -y -qq unclutter xdotool >> "$LOG_FILE" 2>&1
|
||||||
if ! command -v chromium-browser &>/dev/null && ! command -v chromium &>/dev/null; then
|
install_chromium
|
||||||
apt-get install -y -qq chromium-browser >> "$LOG_FILE" 2>&1
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Find Chromium binary
|
# Find Chromium binary
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue