Defined Type: vnc::server::create

Defined in:
manifests/server/create.pp

Overview

Create a new VNC Server Session

Desktop gets set to ‘name’.

Examples:

vnc::server::create { 'vnc_default':
  port => '5900'
}

Parameters:

  • port (Simplib::Port)

    Port on which you wish to enable the VNC session

  • geometry (Vnc::Geometry) (defaults to: '800x600')

    Resolution of your VNC session

  • depth (Integer) (defaults to: 16)

    Specifies the pixel depth, in bits, of the desktop

  • screensaver_timeout (Integer) (defaults to: 15)

    Time after which to disable the screensaver, in minutes.

Author:



24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# File 'manifests/server/create.pp', line 24

define vnc::server::create (
  Simplib::Port $port,
  Vnc::Geometry $geometry            = '800x600',
  Integer       $depth               = 16,
  Integer       $screensaver_timeout = 15
) {

  include 'xinetd'

  xinetd::service { $name:
    banner         => '/dev/null',
    flags          => ['REUSE','IPv4'],
    protocol       => 'tcp',
    socket_type    => 'stream',
    x_wait         => 'no',
    x_type         => 'UNLISTED',
    log_on_success => ['HOST', 'PID', 'DURATION'],
    user           => 'nobody',
    server         => '/usr/bin/Xvnc',
    server_args    => "-inetd -localhost -audit 4 -s ${screensaver_timeout} -query localhost -NeverShared -once -SecurityTypes None -desktop ${name} -geometry ${geometry} -depth ${depth}",
    disable        => 'no',
    trusted_nets   => ['127.0.0.1'],
    port           => $port
  }

}