Module shell_choosers
Expand description
Choosers the session shell draws itself, for sessions whose apps reach no desktop portal (a provider’s headless guest).
The launcher hands every app a connection to the shell’s chooser service
(FD_ENV) and names the app and its workspace on it before the sandbox
starts, so the shell knows who asks without trusting the app. Requests and
replies are newline-delimited JSON (Request, Reply). The shell
shows its own file chooser. Legacy path results remain limited to existing
grants; owner-confirmed contents selections expose only bounded bytes on this
connection, never a directory grant or a replayable host path. When nobody is at the
computer it answers Reply::Nobody and the app falls back to the
unattended picker ([crate::unattended_picker]).
Links go the same way (ShellLink::opener): the shell opens a link in
the app that claims its scheme, as its own search does, and answers
Reply::Unclaimed for one no app it knows opens, which the app then
hands to its desktop’s opener.
Structs§
- Chosen
App - The app the person chose in the shell’s app chooser.
- File
Portal Grant - A private, read-only selection on one authenticated chooser connection. The token names an already-open regular file, never a replayable host path.
- Filter
- One entry of the chooser’s file-type control.
- Handshake
- The launcher’s first frame on a new connection: who the app is.
- Shell
Link - One connection to the session shell, which its choosers and its link opener share. The connection closes when the last of them is dropped.
Enums§
- Pick
Mode - Which chooser a
Request::Pickopens. - Reply
- Shell → app. Every reply names the request it answers.
- Request
- App → shell.
Constants§
- CONTENT_
CHUNK_ BYTES - FD_ENV
- Where the launcher tells the app its connection’s descriptor number.
- MAX_
CONTENT_ BYTES - MAX_
CONTENT_ FILES - MAX_
FRAME_ BYTES - Longest frame either side accepts.
- PROTOCOL
- Version of the launcher’s first frame and of
Request/Reply. - SERVICE
- The service’s name: its socket is
<runtime>/tilo/services/chooser.sock.
Functions§
- inherited_
opener ShellLink::openerover the inherited connection.- inherited_
picker ShellLink::pickerover the inherited connection.- picker
ShellLink::pickerover a new connection onstream.