Skip to main content

Module session

Module session 

Source
Expand description

One screen-mode session: a virtual X screen, a window manager (when the server has one) and an ordinary Chrome on it, started the way a person starts Chrome: no debugging pipe or port, no automation or headless switch, no script put into a page. The only extra arguments are a window size and the page to open (the network is the browser’s managed policy). The browser’s own sandbox is always on: no switch turns it off, and a server asked to start without it refuses.

Structs§

Session
What one session keeps alive: the processes end when it is dropped.

Constants§

DEPTH 🔒
The virtual screen’s colour depth.
LEFTOVER_WAIT 🔒
How long a new first session waits for the browser of the pane before it to finish going away.

Functions§

chrome_args
The arguments of the browser: a profile of its own, the address proxy, a window the size of the screen, and the page to open.
command 🔒
A process that is stopped when its handle is dropped, with the environment it needs and nothing else of srv’s.
kill_group 🔒
End every process in the process group group (the browser and what it started). Nothing is left running that the next session’s “no other browser in this container” check would find.
sandbox_on
The browser’s own sandbox is part of what keeps a page away from the container, so screen mode never starts without it: the switch the streamed pane has for a test host (NO_SANDBOX_ENV) is refused here, in words, and chrome_args has no way to add --no-sandbox.
start
Start the screen, the window manager and the browser, and say which display they are on.
xvfb_args
The arguments of the virtual screen: the largest size it can be (it is set to the pane’s size at once, and follows it after: randr), no network listener, and the display number written to standard output.