CI / test (push) Successful in 2m25s
- New desktop module gamerig-library (components/gamerig-library, logic in lib/gamelib): the layout of gamerig's web library (desktop/ui) in draw ops. Top bar with the Gamerig mark, app count and search; sidebar with categories and counts, running apps (switch to, stop) and rig status (GPU, display, audio); card grid with featured games two columns wide, icon tiles, category and status badges, description, install hint, Launch / Big Picture / Switch to / Stop. Typing filters, arrows + Enter launch, the wheel scrolls. Colours: follow desktop, dark, light. - New game-library capability: tables 26-28 (status, games, launch modes), request 45, in the wasmer/wasmtime stub, the MoonBit wasmhost and the Rust host-wasm. - compositor/shell/gamelib.mbt polls GET $GAMERIG_DESKTOP_API/api/state (default http://127.0.0.1:8091) every 2 s with curl on a socket and POSTs launch/stop/focus; a file:// base reads a state file (tests). - --desktop NAME picks what fills the desktop at start. scripts/gamerig-kiosk.sh now runs a hybrid kiosk with the library as the desktop (CHANDRA_KIOSK_MODE=strict for the old one). - Tests: lib/gamelib, compositor/host/gamelib_test.mbt, a host-wasm test; docs/gamerig-library.md with a screenshot. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DPL5hgvjzw8hHirxRsXSsE
53 lines
2.5 KiB
Markdown
53 lines
2.5 KiB
Markdown
# 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 \
|
|
--desktop gamerig-library
|
|
```
|
|
|
|
`--desktop NAME` (any mode) picks what fills the desktop at start, as Settings > Desktop does: a
|
|
desktop module's id, `wallpaper` or `clock-card`. On a rig that is the
|
|
[Gamerig Library](gamerig-library.md).
|
|
|
|
**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](kiosk-gamerig.md).
|
|
|
|
Code: `compositor/host/kiosk.mbt`, tests in `compositor/host/kiosk_test.mbt`.
|