Monorepo for Aesthetic.Computer aesthetic.computer
4
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix(alpine): fix GUI not launching — robust tty check + cage error visibility

The .profile tty guard `$(tty) = /dev/tty1` fails on Mac EFI hardware
where busybox init reports /dev/console. Use a case match that accepts
/dev/tty1, /dev/console, or unknown tty. Also show cage errors on the
console instead of silently dying to a log file.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

+35 -5
+35 -5
fedac/scripts/make-alpine-kiosk.sh
··· 308 308 # 2g. Profile script — auto-start kiosk session on tty1 309 309 mkdir -p "$ROOTFS_DIR/home/kioskuser" 310 310 cat > "$ROOTFS_DIR/home/kioskuser/.profile" << 'PROFILEEOF' 311 - # Auto-start kiosk session on tty1 only 312 - if [ "$(tty)" = "/dev/tty1" ]; then 313 - exec /usr/local/bin/kiosk-session.sh 314 - fi 311 + # Auto-start kiosk session on tty1 (match /dev/tty1, /dev/console, or unknown tty) 312 + # On some EFI hardware busybox init reports /dev/console instead of /dev/tty1 313 + _tty=$(tty 2>/dev/null) 314 + case "$_tty" in 315 + /dev/tty1|/dev/console|"not a tty"|"") 316 + exec /usr/local/bin/kiosk-session.sh 317 + ;; 318 + esac 315 319 PROFILEEOF 316 320 chown -R 1000:1000 "$ROOTFS_DIR/home/kioskuser" 2>/dev/null || true 317 321 ··· 422 426 echo "[kiosk] launching cage + chromium" 423 427 echo "[kiosk] LIBSEAT_BACKEND=$LIBSEAT_BACKEND SEATD_SOCK=${SEATD_SOCK:-unset}" 424 428 echo "[kiosk] DRI devices: $(ls /dev/dri/ 2>&1)" 429 + 430 + # Check for DRM device — if missing, show diagnostic on console instead of silent fail 431 + if [ ! -e /dev/dri/card0 ]; then 432 + echo "[kiosk] FATAL: no DRM device (/dev/dri/card0) — cage cannot start" >&2 433 + # Restore console output so user can see the error 434 + exec >/dev/console 2>&1 435 + echo "" 436 + echo "=== KIOSK ERROR: No GPU/DRM device found ===" 437 + echo "cage requires /dev/dri/card0 to run." 438 + echo "Check: ls -la /dev/dri/ lspci | grep -i vga dmesg | grep -i drm" 439 + echo "Log: $LOG" 440 + echo "" 441 + # Drop to shell instead of silent exit/respawn loop 442 + exec /bin/sh 443 + fi 444 + 425 445 # Cage launches a single Wayland app fullscreen with black background 426 - exec cage -s -- chromium-browser \ 446 + cage -s -- chromium-browser \ 427 447 --no-first-run \ 428 448 --disable-translate \ 429 449 --disable-infobars \ ··· 450 470 --ignore-gpu-blocklist \ 451 471 --enable-features=VaapiVideoDecoder,VaapiVideoEncoder \ 452 472 "__KIOSK_PIECE_URL__" 473 + CAGE_EXIT=$? 474 + 475 + # If cage exits (crash or missing Wayland support), show error on console 476 + echo "[kiosk] cage exited with code $CAGE_EXIT" 477 + exec >/dev/console 2>&1 478 + echo "" 479 + echo "=== KIOSK: cage exited (code $CAGE_EXIT) ===" 480 + echo "Log: $LOG" 481 + echo "Restarting in 5s... (Ctrl+C for shell)" 482 + sleep 5 453 483 SESSEOF 454 484 455 485 # Replace placeholder URLs