Class: OodCore::BatchConnect::Templates::WayVNC

Inherits:
OodCore::BatchConnect::Template show all
Defined in:
lib/ood_core/batch_connect/templates/wayvnc.rb

Overview

A batch connect template that starts up a wayvnc server attached to a wayland compositor launched by the app's main script. wayvnc exposes its built-in websocket server directly on a port chosen by this template (no websockify), so noVNC connects straight to it.

Instance Attribute Summary

Attributes inherited from OodCore::BatchConnect::Template

#context

Instance Method Summary collapse

Methods inherited from OodCore::BatchConnect::Template

#to_s

Constructor Details

#initialize(context = {}) ⇒ WayVNC

Returns a new instance of WayVNC.

Parameters:

  • context (#to_h) (defaults to: {})

    the context used to render the template

Options Hash (context):

  • :conn_params (#to_sym, Array<#to_sym>) — default: []

    A list of connection parameters added to the connection file. :host, :port, :password and :websocket will always exist. The websocket value mirrors :port since wayvnc serves the websocket on the same listener.

  • :wayvnc_cmd (#to_s) — default: "wayvnc"

    path to the wayvnc executable

  • :wayvnc_log (#to_s) — default: "wayvnc.log"

    path to the wayvnc log file (assumes you don't modify :before_script)

  • :wayvnc_config (#to_s) — default: "wayvnc.conf"

    path to the wayvnc config file generated to enable password authentication (assumes you don't modify :before_script)

  • :wayvnc_log_level (#to_s) — default: "warning"

    log level passed to wayvnc (error, warning, info, debug, trace, quiet)

  • :wayland_socket (#to_s) — default: "${WAYLAND_DISPLAY:-wayland-0}"

    wayland socket name that wayvnc should attach to once the compositor creates it in XDG_RUNTIME_DIR

  • :wayvnc_attach_timeout_seconds (#to_s) — default: "${WAYVNC_ATTACH_TIMEOUT_SECONDS:-30}"

    max time in seconds to wait for the wayland socket before failing the job

  • :wayvnc_extra_args (#to_s) — default: ""

    any extra arguments passed to the wayvnc command

See Also:



48
49
50
# File 'lib/ood_core/batch_connect/templates/wayvnc.rb', line 48

def initialize(context = {})
  super
end