virtscreen

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	VNCPassword string
	EnableVNC   bool
	Width       int
	Height      int
}

Config is user-provided configuration for a virtual screen

type VirtScreen

type VirtScreen struct {
	// contains filtered or unexported fields
}

VirtScreen represents a single virtual screen instance

func NewVirtScreen

func NewVirtScreen(conf *Config) (*VirtScreen, error)

NewVirtScreen will create and start a new virtual screen

func (*VirtScreen) Alive

func (vs *VirtScreen) Alive() bool

Alive will return whether the virtual screen session is alive (X is running, VNC is running if applicable, and we know the X display number)

func (*VirtScreen) Stop

func (vs *VirtScreen) Stop() error

Stop will terminate the X server (and optionally VNC server)

func (*VirtScreen) VNCPassword

func (vs *VirtScreen) VNCPassword() string

VNCPassword will return the password that can be used to connect to the VNC server, or a blank string if VNC is disabled

func (*VirtScreen) VNCPort

func (vs *VirtScreen) VNCPort() int

VNCPort will return the running VNC port, or 0 if the X server is not running

Jump to

Keyboard shortcuts

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