vnc

package
v0.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 21, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseDockerPS

func ParseDockerPS(output string) (map[string]string, error)

ParseDockerPS parses the output of:

docker ps --filter "name=cell-" --format "{{.Names}}\t{{.Ports}}"

and returns a map of AppName → VNC host port.

func ParseInspectPort

func ParseInspectPort(inspectJSON string) (string, error)

ParseInspectPort extracts the host port for container port 5900 from docker inspect JSON output.

func RoyalTSXVNCUrl added in v0.3.0

func RoyalTSXVNCUrl(port string) string

RoyalTSXVNCUrl returns a Royal TSX URI for a VNC connection.

func VNCPasswdFile added in v0.3.0

func VNCPasswdFile() string

VNCPasswdFile returns the path to a VNC password file containing the encrypted password "vnc". Creates the file on first call.

func VNCUrl

func VNCUrl(port string) string

VNCUrl returns a VNC URL for macOS Screen Sharing.

Types

type ContainerMatch

type ContainerMatch struct {
	Name    string // full container name, e.g. "cell-devcell-73-run"
	AppName string // stripped name, e.g. "devcell-73"
	Port    string // VNC host port
}

ContainerMatch holds data about a container matching a host-dir bind mount.

func FindContainersByBind

func FindContainersByBind(inspectJSON, hostDir string) ([]ContainerMatch, error)

FindContainersByBind parses docker inspect JSON (one or many containers) and returns all that have hostDir as the source of a bind mount and have port 5900 published.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL