Documentation
¶
Overview ¶
Package desktop gives a target a private graphical display the operator can watch from a browser.
A tool that drives a real browser — a recorded replay, a test in headed mode, an agent clicking through a page — has nowhere to draw on a headless server, and what it would draw is exactly what the operator wants to see. This starts a virtual display with a VNC server and a noVNC web client on the target, all bound to the target's loopback. The control plane reaches the web client with a port forward, so nothing new listens on the target's network.
A browser running inside that display sees the target's own localhost, which is also the simplest way to use a web app that only listens there.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func OpenBrowser ¶
OpenBrowser starts a browser inside the desktop at address and names the one it found. A target with no browser still has a working desktop: a tool that brings its own, as Playwright does, only needs DISPLAY.
Types ¶
type Desktop ¶
type Desktop struct {
Dir string // private state on the target: pids, logs, the browser profile
Display int // the X display number: tools run with DISPLAY=:<Display>
Port int // the noVNC web client, on the target's loopback
Width int
Height int
}
Desktop is one running display.
type MissingError ¶
type MissingError struct{ Tools []string }
MissingError names what the target needs installed before it can do this.
func (*MissingError) Error ¶
func (e *MissingError) Error() string