feat: offer 'enclave gui' - #29
Draft
sdirix wants to merge 2 commits into
Draft
Conversation
Opt-in `vnc` mixin: a virtual X display (Xvnc) running a fullscreened Chromium, served over VNC (RFB). The raw RFB port is published on the host loopback so any VNC client can attach directly. Find the port with `enclave ps --json` and read the per-session password from /tmp/enclave-vnc/vnc-password. A supervisor keeps Xvnc, matchbox-window-manager, and a headful Chromium at $VNC_URL alive with restart loops. Xvnc listens on all container interfaces so the published port reaches it, and enforces a random password at the RFB layer (VncAuth). That password is what shapes the boundary: holding it is what grants control of the display, and because it is generated per session it reaches exactly one session's display, which is why the agent knowing it is harmless. Exporting DISPLAY and BROWSER=vnc-open routes "open in browser" flows onto the contained display, where all real browsing stays on the session's gateway-restricted network.
2 tasks
Contributor
Author
|
I will rework this command to be named |
Resolves the current project's VNC-enabled session, its published RFB binding, and its per-session password, then launches a host viewer. The default is xtigervncviewer on Linux and macOS Screen Sharing via open, overridable with the vnc_viewer config key. The command and the config key name the protocol rather than the generic "GUI": a viewer has to speak VNC to be usable here, and "GUI" reads as if it were a UI for enclave itself. The password reaches the viewer through the environment (VNC_PASSWORD, ENCLAVE_VNC_PASSWORD) rather than argv, which /proc would expose to every local user for the viewer's lifetime. TigerVNC reads VNC_PASSWORD itself, so the default viewer needs no placeholder and nothing is written to disk. vnc_viewer is a registry option without a CLI flag. It configures a host command, so a one-shot override on the command line would just be the command the user could run directly.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What it does
Resolves the current project's VNC-enabled session, its published RFB
binding, and its per-session password, then launches a host viewer. The
default is
xtigervncvieweron Linux and macOS Screen Sharing via open,overridable with the
gui_viewerconfig key.The password reaches the viewer through the environment (
VNC_PASSWORD,ENCLAVE_VNC_PASSWORD) rather than argv, which /proc would expose toevery local user for the viewer's lifetime. TigerVNC reads
VNC_PASSWORDitself, so the default viewer needs no placeholder and nothing is
written to disk.
gui_vieweris a registry option without a CLI flag. It configures a hostcommand, so a one-shot override on the command line would just be the
command the user could run directly.
Based on #24
How to test
xtigervncviewerif you don't have it already.sudo apt install tigervnc-viewer./bin/enclave --features +vnc./bin/enclave guiFollow-ups
Breaking changes
Review checklist