Version information
This version is compatible with:
- , , , , ,
Start using this module
Add this module to your Puppetfile:
mod 'joshbeard-display', '0.5.3'
Learn more about managing modules with a PuppetfileDocumentation
puppet-display
Table of Contents
- Overview
- Setup - The basics of getting started with display
- Usage - Configuration options and additional functionality
- Reference - classes and parameters
- Limitations - OS compatibility, etc.
- Contributors
Overview
The display module can manage Xvfb (X Virtual Framebuffer) and x11vnc for remote displays.
The base class, display
, can be used to manage both xvfb
and x11vnc
together.
xvfb
and x11vnc
can be managed individually using their own classes if
desired.
Additionally, a profile.d helper script can be managed that exports the
DISPLAY
environment variable.
Setup
What display affects
The display module can manage the following:
- xvfb package
- xvfb service
- x11vnc package
- x11vnc service
Usage
To manage xvfb
and x11vnc
with default parameters:
include ::display
Custom display, resolution and color depth:
class { 'display':
display => 99, # default is 0
width => 1024, # default is 1280
height => 768, # default is 800
color => 24, # default is "24+32" (i.e. 32-bit)
}
Running as a custom user (both xvfb and x11vnc):
class { 'display':
runuser => 'xvfbservice',
}
Only manage xvfb (e.g. not x11vnc) and specify a custom user and fbdir:
class { 'display::xvfb':
runuser => 'xvfbuser',
fbdir => '/var/tmp/xvfb',
}
Only manage x11vnc:
class { 'display::x11vnc':
display => 3,
runuser => 'x11user',
}
Reference
Classes
- display: Main class, includes all other classes (wrapper)
- display::xvfb: Manages xvfb
- display::x11vnc: Manages x11vnc
Class: display
display
X display to use. Default is 0
width
Screen width to use. Default is 1280
height
Screen height to use. Default is 800
color
Screen color depth to use. Default is '24+32'
(32-bit)
runuser
User to run xvfb as. Default is 'root'
fbdir
Directory in which the memory mapped files containing the framebuffer memory
should be created. Defaults to '/tmp'
xvfb_package
Package name for installing xvfb. Defaults to xorg-x11-servers-Xvfb
on
RedHat systems and xvfb
on Debian systems.
xvfb_service
Name of the xvfb service. This class will create an init script with this
name and manage a service by this name. Defaults to xvfb
xvfb_bin
Absolute path to the xvfb
executable. Defaults to /usr/bin/xvfb
on
RedHat and Debian systems and /usr/local/bin/Xvfb
on FreeBSD.
xvfb_custom_args
Custom arguments to use for starting xvfb. If this parameter is defined, the display, width, height, color, and fbdir parameter values will not be used for starting the xvfb service via the init script - that's left up to the user. Optional. Defaults to undefined.
x11vnc_package
Package name for installing x11vnc. Defaults to x11vnc
on RedHat and
Debian systems.
x11vnc_service
Name of the x11vnc service. This class will create an init script with
this name and manage a service with this name. Defaults to x11vnc
x11vnc_bin
Absolute path to the x11vnc
executable. Defaults to /usr/bin/x11vnc
on
RedHat and Debian systems and /usr/local/bin/x11vnc
on FreeBSD.
x11vnc_custom_args
Custom arguments to use for starting x11vnc. If this parameter is defined, the display parameter is unused for starting x11vnc - that's left up to the user. Optional. Defaults to undefined.
display_env
Boolean. Provide a profile.d script to export the DISPLAY
variable.
Defaults to true
.
NOTE: This parameter and the display::env class is being deprecated and will soon be removed.
display_env_path
Absolute path to place a profile.d script that exports the DISPLAY
variable. Defaults to /etc/profile.d/vagrant_display.sh
This is only effective if 'profiled' is true
.
NOTE: This parameter and the display::env class is being deprecated and will soon be removed.
Class: display::xvfb
display
X display to use. Default is 0
width
Screen width to use. Default is 1280
height
Screen height to use. Default is 800
color
Screen color depth to use. Default is '24+32'
(32-bit)
runuser
User to run xvfb as. Default is 'root'
fbdir
Directory in which the memory mapped files containing the framebuffer memory
should be created. Defaults to '/tmp'
package
Package name for installing xvfb. Defaults to xorg-x11-servers-Xvfb
on
RedHat systems and xvfb
on Debian systems.
custom_args
Custom arguments to use for starting xvfb. If this parameter is defined, the display, width, height, color, and fbdir parameter values will not be used for starting the xvfb service via the init script - that's left up to the user. Optional. Defaults to undefined.
service
Name of the xvfb service. This class will create an init script with this
name and manage a service by this name. Defaults to xvfb
Class: display::x11vnc
display
X display to use. Default is 0
runuser
User to run xvfb as. Default is 'root'
package
Package name for installing x11vnc. Defaults to x11vnc
on RedHat and
Debian systems.
service
Name of the x11vnc service. This class will create an init script with
this name and manage a service with this name. Defaults to x11vnc
x11vnc_bin
Absolute path to the x11vnc
executable. Defaults to /usr/bin/x11vnc
on
RedHat and Debian systems and /usr/local/bin/x11vnc
on FreeBSD.
custom_args
Custom arguments to use for starting x11vnc. If this parameter is defined, the display parameter is unused for starting x11vnc - that's left up to the user. Optional. Defaults to undefined.
Class: display::env
NOTE: This class is being deprecated and will soon be removed.
This is better managed by your own implementation class. For example, a profile class.
file
Absolute path where a file should be place that exports the DISPLAY
environment variable. Defaults to /etc/profile.d/vagrant_display.sh
display
X display to use. Default is 0
Limitations
This module has been built on a tested against Puppet 3.
Supported and tested on RedHat, Debian, and FreeBSD families.
Contributors
Alex Rodionov https://github.com/p0deje
Josh Beard http://joshbeard.me
Joshua Hoblitt https://github.com/jhoblitt
License
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
0.5.3 (2016-07-22)
- Update metadata - concat dependency version (#4)
0.5.2 (2015-11-04)
- Update spec tests for Puppet 4
- Fix init script quoting of commands and output
0.5.1 (2015-09-21)
- Improvements to integer validation (#2) @scarby
0.5.0 (2015-03-25)
- Support custom arguments for starting x11vnc and xvfb
- Quote default integers, class name fixes @tayzlor
- Init script enhancements @darktim
- Update to tests
0.4.0 (2014-12-16)
- Update documentation
0.3.0
- Inherited module from @p0dje and initial refactoring
Dependencies
- puppetlabs/concat (>= 1.1.1 <3.0.0)
- puppetlabs/stdlib (>= 4.9.0 <5.0.0)
Copyright (C) 2013-2014 Joshua Beard <beard@puppetlabs.com> Copyright (C) 2013-2014 Alex Rodionov <p0deje@gmail.com> Copyright (C) 2012-2014 Joshua Hoblitt <jhoblitt@cpan.org> Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.