deskconn

package module
v0.1.0-alpha Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2026 License: MIT Imports: 23 Imported by: 0

README

Deskconn

Deskconn is a desktop management suite. It consists of two main tools: a desktop daemon and a command-line client.

deskconnd

The desktop daemon responsible for registering and exposing desktop APIs to the Deskconn ecosystem. It runs in the background and enables remote management and control of the desktop.

Run
make run-deskconnd

deskconnctl

A command-line tool used to manage desktops. It can attach a desktop to the cloud, execute commands, and perform other administrative tasks.

Build
make build-deskconnctl
Run

Run the resulting binary to see available commands and help:

./deskconnctl

Documentation

Index

Constants

View Source
const (
	Realm                             = "io.xconn.deskconn"
	ProcedureDeskconnAttachDesktop    = "io.xconn.deskconn.desktop.attach"
	ProcedureDeskconnOrganizationList = "io.xconn.deskconn.organization.list"
	MachineIDPath                     = "/etc/machine-id"
)
View Source
const (
	ProcedureScreenBrightnessGet = "io.xconn.deskconn.deskconnd.screen.brightness.get"
	ProcedureScreenBrightnessSet = "io.xconn.deskconn.deskconnd.screen.brightness.set"
	ProcedureScreenLock          = "io.xconn.deskconn.deskconnd.screen.lock"
	ProcedureScreenIsLocked      = "io.xconn.deskconn.deskconnd.screen.islocked"
	ProcedureShell               = "io.xconn.deskconn.deskconnd.shell"

	ProcedureMPRISPlayers   = "io.xconn.deskconn.deskconnd.mpris.players"
	ProcedureMPRISPlayPause = "io.xconn.deskconn.deskconnd.mpris.playpause"
	ProcedureMPRISPlay      = "io.xconn.deskconn.deskconnd.mpris.play"
	ProcedureMPRISPause     = "io.xconn.deskconn.deskconnd.mpris.pause"
	ProcedureMPRISNext      = "io.xconn.deskconn.deskconnd.mpris.next"
	ProcedureMPRISPrevious  = "io.xconn.deskconn.deskconnd.mpris.previous"

	ErrInvalidArgument = "wamp.error.invalid_argument"
	ErrOperationFailed = "wamp.error.operation_failed"
)

Variables

View Source
var BacklightBasePath = "/sys/class/backlight" //nolint: gochecknoglobals

Functions

func AdvertiseService

func AdvertiseService(hostname string, port int, realm string) (*zeroconf.Server, error)

func Attach

func Attach(session *xconn.Session, desktopName, orgID string) error

func CloudURI

func CloudURI() string

func StartInteractiveShell

func StartInteractiveShell(session *xconn.Session) error

Types

type Credentials

type Credentials struct {
	AuthID         string `json:"auth_id"`
	PublicKey      string `json:"public_key"`
	PrivateKey     string `json:"private_key"`
	OrganizationID string `json:"organization_id"`
}

func EnsureCredentials

func EnsureCredentials() (*Credentials, error)

type Deskconn

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

func NewDeskconn

func NewDeskconn(screen *Screen, mpris *MPRIS) *Deskconn

func (*Deskconn) Register

func (d *Deskconn) Register(session *xconn.Session) error

type MPRIS

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

func NewMPRIS

func NewMPRIS(conn *dbus.Conn) *MPRIS

func (*MPRIS) ListPlayers

func (m *MPRIS) ListPlayers() (map[string]string, error)

func (*MPRIS) Next

func (m *MPRIS) Next() error

func (*MPRIS) NextPlayer

func (m *MPRIS) NextPlayer(name string) error

func (*MPRIS) Pause

func (m *MPRIS) Pause() error

func (*MPRIS) PausePlayer

func (m *MPRIS) PausePlayer(name string) error

func (*MPRIS) Play

func (m *MPRIS) Play() error

func (*MPRIS) PlayPause

func (m *MPRIS) PlayPause() error

func (*MPRIS) PlayPausePlayer

func (m *MPRIS) PlayPausePlayer(name string) error

func (*MPRIS) PlayPlayer

func (m *MPRIS) PlayPlayer(name string) error

func (*MPRIS) Previous

func (m *MPRIS) Previous() error

func (*MPRIS) PreviousPlayer

func (m *MPRIS) PreviousPlayer(name string) error

type Screen

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

func NewScreen

func NewScreen(sessionBus, systemBus *dbus.Conn) *Screen

func (*Screen) GetBrightness

func (s *Screen) GetBrightness() (int, error)

func (*Screen) IsLocked

func (s *Screen) IsLocked() (bool, error)

func (*Screen) Lock

func (s *Screen) Lock() error

func (*Screen) SetBrightness

func (s *Screen) SetBrightness(percent int) error

Directories

Path Synopsis
cmd
deskconnctl command
deskconnd command

Jump to

Keyboard shortcuts

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