Your company here — click to reach over 10,000 unique daily visitors

wayvncctl - Man Page

A command line control client for wayvnc(1)


wayvncctl [options] [command [--parameter value ...]]


-S,  --socket=<path>

Set wayvnc control socket path. Default: $XDG_RUNTIME_DIR/wayvncctl or /tmp/wayvncctl-$UID

-w,  --wait

Wait for wayvnc to start up if it's not already running. Default: Exit immediately with an error if wayvnc is not running.


If disconnected while waiting for events, wait for wayvnc to restart and re-register for events. Default: Exit when wayvnc exits.

-j,  --json

Produce json output to stdout.

-V,  --version

Show version info.


Be more verbose.

-h,  --help

Get help about the wayvncctl command itself (lists these options). Does not connect to the wayvncctl control socket.


wayvnc(1) allows runtime interaction via a unix socket json-ipc mechanism. This command line utility provides easy interaction with those commands.

This command is largely self-documenting:

Asynchronous Events

While wayvncctl normally terminates after sending one request and receiving the corresponding reply, the event-receive command acts differently. Instead of exiting immediately, wayvncctl waits for any events from the server, printing each to stdout as they arrive. This mode of operation will block until either it receives a signal to terminate, or until the wayvnc server terminates.

In --json mode, each event is printed on one line, with a newline character at the end, for ease in scripting:

  $ wayvncctl --json event-receive

The default human-readible output is a multi-line yaml-like format, with two newline characters between each event:

  $ wayvncctl event-receive

  id: 0x10ef670
  connection_count: 1

  id: 0x10ef670
  connection_count: 0

Special Local Event Types

Especially useful when using --wait or --reconnect mode, wayvncctl will generate 2 additional events not documented in wayvnc(1):


Sent when a successful wayvnc control connection is established and event registration has succeeded, both upon initial startup and on subsequent registrations with --reconnect.

No paramerers.


Sent when the wayvnc control connection is dropped, usually due to wayvnc exiting.

No paramerers.


Get help on the "output-set" IPC command:

  $ wayvncctl output-set --help
  Usage: wayvncctl [options] output-set <output-name> [params]

Cycle to the next active output:

  $ wayvncctl output-cycle

Get json-formatted version information:

  $ wayvncctl --json version

A script that takes an action for each client connect and disconnect event:


connection_count_now() {
    echo "Total clients: $1"

while IFS= read -r EVT; do
    case "$(jq -r '.method' <<<"$EVT")" in
            count=$(jq -r '.params.connection_count' <<<"$EVT")
            connection_count_now "$count"
            connection_count_now 0
done < <(wayvncctl --wait --reconnect --json event-receive)


The following environment variables have an effect on wayvncctl:


Specifies the default location for the wayvncctl control socket.

See Also


Referenced By