Update kiosk to use weston
This commit is contained in:
+15
-12
@@ -258,33 +258,36 @@ build {
|
||||
]
|
||||
}
|
||||
|
||||
# --- 2b. Kiosk mode: Wayland (cage) + fullscreen Chromium ---------------
|
||||
# --- 2b. Kiosk mode: Wayland (weston kiosk-shell) + fullscreen Chromium --
|
||||
# Post-pivot graphical kiosk (no initramfs impact). Baked into the immutable
|
||||
# root, fleet-generic. Empty kiosk_url skips it. EPEL is enabled for cage +
|
||||
# root, fleet-generic. Empty kiosk_url skips it. EPEL is enabled for weston +
|
||||
# chromium — a supply-chain surface (accepted for the lab; see TODO #4).
|
||||
# NOTE: pulls in Chromium + Mesa (~hundreds of MB) — grows the uncompressed
|
||||
# erofs namespace noticeably. Graphical bring-up needs a display to verify;
|
||||
# likely tweak points: cage availability in EPEL, chromium ozone/wayland,
|
||||
# WLR_RENDERER, --disable-gpu, and SELinux AVCs for the GUI stack.
|
||||
# weston kiosk-shell is used because cage isn't packaged for EL9; weston 8.0
|
||||
# (EPEL 9) ships kiosk-shell.so and is far lighter than GDM+gnome-kiosk.
|
||||
# NOTE: pulls in Chromium + Mesa + weston (~hundreds of MB) — grows the
|
||||
# uncompressed erofs namespace noticeably. Graphical bring-up needs a display
|
||||
# to verify; likely tweak points: chromium ozone/wayland, --disable-gpu vs a
|
||||
# real GPU, /dev/dri present in the VM, and SELinux AVCs for the GUI stack.
|
||||
provisioner "shell" {
|
||||
environment_vars = ["KIOSK_URL=${var.kiosk_url}"]
|
||||
inline = [
|
||||
"set -e",
|
||||
"if [ -z \"$KIOSK_URL\" ]; then echo 'kiosk_url empty -> skipping kiosk install.'; exit 0; fi",
|
||||
"echo '==> Enabling EPEL + installing kiosk stack (cage, chromium, mesa)'",
|
||||
"echo '==> Enabling EPEL + installing kiosk stack (weston, chromium, mesa)'",
|
||||
"dnf install -y epel-release",
|
||||
"dnf install -y cage chromium mesa-dri-drivers mesa-libEGL mesa-libgbm dejavu-sans-fonts",
|
||||
"dnf install -y weston chromium mesa-dri-drivers mesa-libEGL mesa-libgbm dejavu-sans-fonts",
|
||||
# Unprivileged, passwordless kiosk user; video/input as a seat fallback.
|
||||
"id kiosk >/dev/null 2>&1 || useradd -m -G video,input kiosk",
|
||||
# Install the staged unit + wrapper.
|
||||
# Install the staged unit, weston config, and session wrapper.
|
||||
"install -D -m0755 /tmp/kiosk/kiosk-session /usr/local/bin/kiosk-session",
|
||||
"install -D -m0644 /tmp/kiosk/kiosk.service /etc/systemd/system/kiosk.service",
|
||||
# URL (from the var) + software wlroots renderer for VMs without a GPU.
|
||||
"install -D -m0644 /tmp/kiosk/weston.ini /etc/xdg/weston/weston.ini",
|
||||
# URL from the var (weston renderer is set via --use-pixman in the unit).
|
||||
"install -d -m0755 /etc/kiosk",
|
||||
"printf 'KIOSK_URL=%s\\nWLR_RENDERER=pixman\\n' \"$KIOSK_URL\" > /etc/kiosk/kiosk.env",
|
||||
"printf 'KIOSK_URL=%s\\n' \"$KIOSK_URL\" > /etc/kiosk/kiosk.env",
|
||||
"chmod 0644 /etc/kiosk/kiosk.env",
|
||||
# Label the new files so they survive into the enforcing erofs.
|
||||
"restorecon -R /usr/local/bin/kiosk-session /etc/systemd/system/kiosk.service /etc/kiosk",
|
||||
"restorecon -R /usr/local/bin/kiosk-session /etc/systemd/system/kiosk.service /etc/xdg/weston /etc/kiosk",
|
||||
# Boot graphical and start the kiosk (replaces the tty1 getty).
|
||||
"systemctl enable kiosk.service",
|
||||
"systemctl set-default graphical.target",
|
||||
|
||||
Reference in New Issue
Block a user