Files
chandra/docs/kiosk.md
T
Claude b4f7149c72
CI / test (push) Successful in 3m49s
Kiosk: --kiosk-hybrid keeps the desktop and locks only leaving the session
Panel, launcher, dock, desktop module and shortcuts stay; Log out and power
actions are refused while locked. Admin escape and chandra-ctl kiosk work as
in the strict kiosk.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DPL5hgvjzw8hHirxRsXSsE
2026-11-26 02:38:02 +00:00

2.2 KiB

Kiosk mode

--kiosk CMD turns Chandra into a single-app shell: a game-streaming rig's home screen, a terminal on a stand, a wall display.

build/wasmhost build/compositor.wasm --socket "$XDG_RUNTIME_DIR/wayland-kiosk" --kiosk "foot"
build/wasmhost build/compositor.wasm --x11 --fullscreen --app-id gamerig-desktop --kiosk "my-launcher"

While the kiosk is locked (it starts locked):

  • no panel, and no room kept for it;
  • no compositor shortcuts: the Super tap, Super+D, Super+W, screenshots and recordings, Super+1..9 all do nothing, and Super isn't passed to the app;
  • no desktop or panel right-click menus;
  • the focused window fills the screen (fullscreen, no frame); other windows wait behind it, Alt+Tab brings them forward; dialogs (windows with a parent) float over it;
  • CMD is started with WAYLAND_DISPLAY set (as every app Chandra starts), and started again when no window is left: at once when its window goes, after 20 s if it never showed one, with a growing delay (1 s, 2 s, 4 s ... 30 s) if it keeps dying within 10 s of starting. "" starts nothing.

Hybrid kiosk

--kiosk-hybrid (alone, or with --kiosk CMD) keeps the whole desktop and locks only the way out: the panel, the launcher, the dock, the desktop module (Icon Desktop, a game library), the shortcuts and the usual window layout all work, while Log out and suspend / restart / power off are refused with a notice. CMD, if given, is started and restarted as above (when no window at all is left).

build/wasmhost build/compositor.wasm --x11 --fullscreen --app-id gamerig-desktop --kiosk-hybrid

Admin escape: Ctrl+Alt+Shift+Escape unlocks the kiosk (panel, shortcuts and menus come back, windows leave fullscreen) and locks it again. From a script: chandra-ctl kiosk unlock, chandra-ctl kiosk lock, chandra-ctl kiosk status.

A kiosk doesn't reopen the last session's windows and doesn't save its own.

--app-id NAME sets the X11 WM_CLASS (with --x11) or the Wayland app id (with --window) of Chandra's own window, so a window manager rule or wmctrl -xa NAME can find it.

On a gamerig rig: scripts/gamerig-kiosk.sh, see kiosk-gamerig.md.

Code: compositor/host/kiosk.mbt, tests in compositor/host/kiosk_test.mbt.