Puppet Class: badstation::x11
- Defined in:
- manifests/x11.pp
Overview
BadQuanta likes X11
Variables
- $session
-
Session specifes what the default X11 session should be.
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 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 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 |
# File 'manifests/x11.pp', line 5
class badstation::x11(
$window_manager = 'awesome',
$display_manager = 'slim',
$xterm = 'gnome-terminal',
$x2go = $badstation::remote,
) {
case($window_manager){ # Tweak the ones we know.
'awesome':{
package{'awesome':
ensure => 'present'
}
exec {'awesome_windowmanger':
command => '/usr/bin/sudo update-alternatives --set x-window-manager /usr/bin/awesome',
require => Package['awesome'],
}
# TODO: Awesome Configuration?
}
'mate':{
include badstation::x11::mate
}
'lxde':{
include badstation::x11::lxde
}
default:{
notify{'UNKOWN SESSION':
message => "Unkown Session ${session}"
} } }
# How to handle different display manager requests:
case($display_manager){
'slim':{
package{'slim':
ensure => 'present',
}
# TODO: Slim configuration?
}
default:{
notify{'UNKOWN_DM':
message => "Unkown Display Manager ${slim}"
} } }
# How to handle different x-terms
case($xterm){
'gnome-terminal':{
package{'gnome-terminal':
ensure => 'present',
}
exec {'update-alternatives gnome-terminal':
command => '/usr/bin/sudo update-alternatives --set x-terminal-emulator /usr/bin/gnome-terminal.wrapper',
require => Package['gnome-terminal'],
}
}
default:{
notify{'UNKNOWN XTERM':
message => "Unkown XTERM: ${xterm}",
}
}
}
# Misc Essential X11 Apps:
package { [
'xclip', # A program for interacting with the clipboard.
'tilda', # A very simple quake like terminal.
'x2goclient', # Good alternative for remote X11 access.
'dolphin',
'pcmanfm', # Two good file managers.
]:
ensure => 'latest'
}
# These are needed only when running virtually
if $::is_virtual{
package { 'virtualbox-guest-x11':
ensure => 'latest',
}
}
if ($badstation::remote){
include badstation::x11::x2go
}
}
|