1 | # copyright <sebas @ koumbit.org> |
---|
2 | # copyright <josx @ interorganic.com.ar > |
---|
3 | # Licence: GPL |
---|
4 | # |
---|
5 | |
---|
6 | class escritorio::gnome-theme::xp { |
---|
7 | $local_path = "/dist/svn-redcta" |
---|
8 | $local_name = "gnome-theme-xp" |
---|
9 | $jaunty_script = "change-default-to-xp.sh" |
---|
10 | $lucid_script = "lucid-escritorio-xp.sh" |
---|
11 | $jaunty_file_path = "$local_path/$local_name/$jaunty_script" |
---|
12 | $lucid_file_path = "$local_path/$local_name/$lucid_script" |
---|
13 | |
---|
14 | case $operatingsystem { |
---|
15 | Ubuntu: { |
---|
16 | case $lsbdistcodename { |
---|
17 | Jaunty: { |
---|
18 | $ejecuta = $jaunty_file_path |
---|
19 | } |
---|
20 | Lucid: { |
---|
21 | $ejecuta = $lucid_file_path |
---|
22 | } |
---|
23 | default: { |
---|
24 | err("No hay tema para $operatingsystem - $lsbdistcodename") |
---|
25 | } |
---|
26 | } |
---|
27 | } |
---|
28 | } |
---|
29 | |
---|
30 | svn::checkout { gnome-theme-xp: |
---|
31 | repository => "https://svn.redcta.org.ar/proyectos/redcta/trunk/gnome-theme-xp", |
---|
32 | local_path => $local_path, |
---|
33 | local_name => $local_name, |
---|
34 | notify => [ Exec["$ejecuta"] ], |
---|
35 | before => [ File["$ejecuta"] , Exec["$ejecuta"] ], |
---|
36 | } |
---|
37 | |
---|
38 | file { "/dist/svn-redcta/gnome-theme-xp/change-default-to-xp.sh": |
---|
39 | ensure => "present", |
---|
40 | owner => "root", group => "root", mode => "755", checksum => mtime, |
---|
41 | } |
---|
42 | |
---|
43 | file { "$lucid_file_path": |
---|
44 | ensure => "present", |
---|
45 | owner => "root", group => "root", mode => "755", checksum => mtime, |
---|
46 | } |
---|
47 | |
---|
48 | # Esto no deberia hacerse, solamente habria usar ejecutar, lo dejo por jaunty |
---|
49 | # ver changeset [643] |
---|
50 | # falta poner refresh = true en lucid |
---|
51 | case $operatingsystem { |
---|
52 | Ubuntu: { |
---|
53 | case $lsbdistcodename { |
---|
54 | Jaunty: { |
---|
55 | exec { "$jaunty_file_path": |
---|
56 | refreshonly => true, |
---|
57 | subscribe => File["/dist/svn-redcta/gnome-theme-xp/change-default-to-xp.sh"] |
---|
58 | } |
---|
59 | } |
---|
60 | Lucid: { |
---|
61 | exec { "$lucid_file_path": |
---|
62 | refreshonly => true, |
---|
63 | subscribe => File["$lucid_file_path"] |
---|
64 | } |
---|
65 | } |
---|
66 | default: { |
---|
67 | err("No hay tema para $operatingsystem - $lsbdistcodename") |
---|
68 | } |
---|
69 | } |
---|
70 | } |
---|
71 | default: { |
---|
72 | err("No hay tema para $operatingsystem") |
---|
73 | } |
---|
74 | } |
---|
75 | } |
---|
76 | |
---|
77 | |
---|
78 | class escritorio::iconos { |
---|
79 | |
---|
80 | package { [ "xdg-utils" ]: ensure => installed } |
---|
81 | |
---|
82 | # Modificamos el archivo xdg-desktop-icon porque solo funcionaba para el directorio Desktop |
---|
83 | file { "/usr/bin/xdg-desktop-icon": |
---|
84 | owner => root, |
---|
85 | group => root, |
---|
86 | mode => 755, |
---|
87 | source => "puppet:///escritorio/xdg/xdg-desktop-icon", |
---|
88 | require => Package["xdg-utils"] |
---|
89 | } |
---|
90 | |
---|
91 | file { "/etc/X11/Xsession.d/65xdg-user-desktop-icons-update": |
---|
92 | ensure => "/dist/svn-redcta/gnome-theme-xp/Xsession.d/65xdg-user-desktop-icons-update" |
---|
93 | } |
---|
94 | |
---|
95 | } |
---|
96 | |
---|
97 | |
---|
98 | class escritorio::fondos::cta { |
---|
99 | |
---|
100 | svn::checkout { escritorio-fondos-cta: |
---|
101 | repository => "https://svn.redcta.org.ar/proyectos/redcta/trunk/escritorio-fondos-cta", |
---|
102 | local_path => "/dist/svn-redcta", |
---|
103 | local_name => "escritorio-fondos-cta" |
---|
104 | } |
---|
105 | |
---|
106 | file { "/usr/share/backgrounds/wpiedras-hojitas.jpg": |
---|
107 | ensure => "/dist/svn-redcta/escritorio-fondos-cta/wpiedras-hojitas.jpg" |
---|
108 | } |
---|
109 | |
---|
110 | file { "/usr/share/backgrounds/wpiedras-verdecito.jpg": |
---|
111 | ensure => "/dist/svn-redcta/escritorio-fondos-cta/wpiedras-verdecito.jpg" |
---|
112 | } |
---|
113 | } |
---|
114 | |
---|
115 | |
---|
116 | class escritorio::autostart-off { |
---|
117 | |
---|
118 | define deshabilita_servicios($archivos) { |
---|
119 | deshabilita_servicio { $archivos: archivo => $name } |
---|
120 | } |
---|
121 | |
---|
122 | define habilita_servicios($archivos) { |
---|
123 | habilita_servicio { $archivos: archivo => $name } |
---|
124 | } |
---|
125 | |
---|
126 | define deshabilita_servicio($archivo) { |
---|
127 | file { "${archivo}/$name" : ensure => present, } |
---|
128 | |
---|
129 | line { "verdadero$name" : |
---|
130 | file => "${archivo}/$name", |
---|
131 | line => "X-GNOME-Autostart-enabled=true", |
---|
132 | ensure => absent, |
---|
133 | } |
---|
134 | line { "falso$name": |
---|
135 | file => "${archivo}/$name" , |
---|
136 | line => "X-GNOME-Autostart-enabled=false", |
---|
137 | ensure => present, |
---|
138 | } |
---|
139 | } |
---|
140 | |
---|
141 | define habilita_servicio($archivo) { |
---|
142 | file { "${archivo}/$name" : ensure => present, } |
---|
143 | |
---|
144 | line { "falso$name": |
---|
145 | file => "${archivo}/$name" , |
---|
146 | line => "X-GNOME-Autostart-enabled=false", |
---|
147 | ensure => absent, |
---|
148 | } |
---|
149 | line { "verdadero$name" : |
---|
150 | file => "${archivo}/$name", |
---|
151 | line => "X-GNOME-Autostart-enabled=true", |
---|
152 | ensure => present, |
---|
153 | } |
---|
154 | |
---|
155 | } |
---|
156 | |
---|
157 | case $operatingsystem { |
---|
158 | Ubuntu: { |
---|
159 | case $lsbdistcodename { |
---|
160 | Jaunty: { |
---|
161 | deshabilita_servicios { "/etc/xdg/autostart": |
---|
162 | archivos => [ "vino-server.desktop", "update-notifier.desktop", "bluetooth-applet.desktop", "evolution-alarm-notify.desktop", "jockey-gtk.desktop", "gnome-at-session.desktop", "gnome-power-manager.desktop" ], |
---|
163 | } |
---|
164 | } |
---|
165 | Lucid: { |
---|
166 | deshabilita_servicios { "/etc/xdg/autostart": |
---|
167 | archivos => [ "at-spi-registryd.desktop", "bluetooth-applet.desktop", "gwibber.desktop", "evolution-alarm-notify.desktop", "indicator-applet.desktop", "gdu-notification-daemon.desktop", "jockey-gtk.desktop", "gnome-at-session.desktop", "gnome-keyring-pkcs11.desktop", "polkit-gnome-authentication-agent-1.desktop", "gnome-keyring-secrets.desktop", "polkit-kde-authentication-agent-1.desktop", "gnome-keyring-ssh.desktop", "print-applet.desktop", "gnome-power-manager.desktop", "pulseaudio.desktop", "update-notifier.desktop", "vino-server.desktop", "user-dirs-update-gtk.desktop", "gnome-user-share.desktop" ], |
---|
168 | } |
---|
169 | |
---|
170 | habilita_servicios { "/etc/xdg/autostart": archivos => ["nm-applet.desktop","gnome-volume-control-applet.desktop"] } |
---|
171 | |
---|
172 | line { "ponerloparagnome": |
---|
173 | file => "/etc/xdg/autostart/gnome-volume-control-applet.desktop", |
---|
174 | line => "OnlyShowIn=GNOME;", |
---|
175 | ensure => present |
---|
176 | } |
---|
177 | line { "quitarparaxfce": |
---|
178 | file => "/etc/xdg/autostart/gnome-volume-control-applet.desktop", |
---|
179 | line => "OnlyShowIn=XFCE;", |
---|
180 | ensure => absent |
---|
181 | } |
---|
182 | line { "quitarnodisplay": |
---|
183 | file => "/etc/xdg/autostart/gnome-volume-control-applet.desktop", |
---|
184 | line => "NoDisplay=true", |
---|
185 | ensure => absent |
---|
186 | } |
---|
187 | |
---|
188 | } |
---|
189 | default: { |
---|
190 | err("No hay deshabilitacion de servicios para $opertatingsystem - $lsbdistcodename") |
---|
191 | } |
---|
192 | } |
---|
193 | } |
---|
194 | default: { |
---|
195 | err("No hay deshabilitacion de servicios para $operatingsystem") |
---|
196 | } |
---|
197 | } |
---|
198 | } |
---|
199 | |
---|