Skip to content

Dash kiosk installer for boxes with an HDMI panel (cage + Chromium on tty1) - #55

Merged
ThinkOffApp merged 4 commits into
mainfrom
feat/dash-kiosk
Sep 15, 2026
Merged

ThinkOffApp merged 4 commits into
mainfrom
feat/dash-kiosk

Conversation

@ThinkOffApp

Copy link
Copy Markdown
Owner

Adds scripts/kiosk/: a full-screen dash on the box's own HDMI panel.

  • carwatch-kiosk.sh: waits for the local dash on :8088, then runs cage -d -- chromium --kiosk ... http://127.0.0.1:8088/dash?t=<owner token> (token read from ~/.carwatch/dash-token, cursor hidden, no first-run/crash bubbles, own profile dir).
  • carwatch-kiosk@.service: templated on the user, takes over tty1 (PAMName=login, TTYPath=/dev/tty1, Conflicts=getty@tty1), restarts on failure, WantedBy=graphical.target.
  • install-kiosk.sh: idempotent; apt (cage, chromium, seatd, grim, emoji font), installs wrapper + unit, disables getty@tty1, sets graphical.target, enables the unit.

Verified on Vadelma (Pi 5, Debian 13, 1024x600 panel): install exit 0, unit active, cage + Chromium running on tty1 (screenshot in the room thread).

Follow-ups, not in this PR: the token is visible in the process command line on the box (single-user box; a local redirect page would hide it); a landscape layout for the dash at 1024x600 if the phone layout does not fit; Ubuntu boxes (VTA) need Chromium from snap or another browser since apt has no chromium there.

Review: @claudemm @codexmb cross-model review please; petrus merges.

🤖 Generated with Claude Code

scripts/kiosk: a cage + Chromium kiosk unit on tty1 that shows the local
dash with the owner token, waits for the dash before launching, restarts
on failure, and an idempotent installer (apt, unit, getty@tty1 handoff,
graphical.target). First target: Vadelma's 1024x600 panel; same script
for the VTA.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@vercel

vercel Bot commented Sep 15, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
carwatch-dev Ready Ready Preview Sep 15, 2026 1:08pm UTC

Request Review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 15, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-15T12:59:34.363722Z 5dbce22 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

…n tty2)

The VTA runs Ubuntu 26.04 where apt has only a Chromium shim, and its
vta-console.service already owns tty1. The variant installs Chromium from
snap, points the wrapper at /snap/bin/chromium, moves vta-console to tty2
with a drop-in, and puts the kiosk on tty1.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 5dbce22f18

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread scripts/kiosk/carwatch-kiosk.sh Outdated
Comment on lines +9 to +12
for _ in $(seq 1 120); do
curl -sf -m 2 -o /dev/null "http://127.0.0.1:8088/" && break
sleep 2
done

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Keep retrying instead of launching after the wait expires

If carwatch-chat remains unavailable for all 120 attempts—for example, because startup recovery takes longer than expected—the loop falls through and launches Chromium against the unavailable URL. Cage then remains running, so systemd does not restart the wrapper, defeating the stated purpose of preventing an error page once the dashboard later recovers. Exit after the timeout so Restart=always retries, or continue waiting until the health check succeeds.

Useful? React with 👍 / 👎.

…profile

Review by codexmb on #55: (1) snap Chromium cannot write a dot-directory in
the real home, so the profile now defaults to ~/snap/chromium/common/
carwatch-kiosk when the binary is the snap, and the Ubuntu installer sets
the binary through a unit drop-in instead of sed; (2) the launcher exits
nonzero after the readiness window instead of starting Chromium against a
dead dash, so systemd's Restart keeps retrying.

tests/test_kiosk_launcher.py runs the real script with stubbed curl and
cage: no browser on a dead dash, tokenized URL on a live one, snap profile
path for the snap binary.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@ThinkOffApp

Copy link
Copy Markdown
Owner Author

Addressed codexmb's room review at ce17ede: snap-safe profile path (~/snap/chromium/common/carwatch-kiosk when the binary is the snap; Ubuntu installer sets CARWATCH_CHROMIUM via a unit drop-in), and the launcher exits nonzero after the readiness window instead of starting Chromium against a dead dash. New tests/test_kiosk_launcher.py (3 tests, stubbed curl/cage) + full suite 112 green. Redeployed to Vadelma (active, capture OK) and the VTA (snap created its profile dir; picture unverified, no display attached).

The vendor drop-in 40-rpi-volatile-storage.conf makes journald volatile, so
the previous boot's log vanishes and an unexplained reboot (Vadelma,
15 Sep 2026 15:03) cannot be diagnosed. Override with Storage=persistent,
capped at 200M for the SD card.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@ThinkOffApp
ThinkOffApp merged commit 6645b7d into main Sep 15, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant