Stained Glass OS

0011 — sg-compositor: our own Wayland compositor, starting from cage

Context

Phase 0 hosts the session in cage, a kiosk compositor that shows one fullscreen application. It got us to a booting Windows shell, and it cannot take us further. Three things now need a compositor we control:

Decision

Build sg-compositor on wlroots 0.18, starting from cage 0.2.0, in its own repo.

Milestones, each with a gate

  1. Replace cage. sg-session's session gate passes with sg-compositor hosting the session. No behaviour change.
  2. Lock mode with input isolation. While locked, one designated lock client receives all input and the user's XWayland receives none. Gated by sg-lock-security-check running on the real compositor: the adversary lives in the compositor's XWayland, the secret is typed into the lock client, and it must not appear.
  3. Session-scoped privileged protocols. Screen capture and virtual keyboard/pointer are offered only to clients whose Unix uid is the machine session's (wl_client_get_credentials, which reads SO_PEERCRED — the kernel's word, not the client's). Gated by a user-session client asking and being refused, and a machine-session client asking and being served.

Then the shell work (layer shell, toplevels) builds on it.

Consequences