source: trunk/puppet/modules/puppet-escritorio/manifests/classes/gnome.pp @ 689

Last change on this file since 689 was 689, checked in by sebas@…, 14 years ago

hay que dejar el servicio gnome-settings-daemon.desktop sino no activa nuestro desktop

File size: 5.1 KB
Line 
1# copyright <sebas @ koumbit.org>
2# copyright <josx @ interorganic.com.ar >
3# Licence: GPL
4#
5
6class 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        before => [ File["$ejecuta"] , Exec["$ejecuta"]  ],
35    }
36
37    file { "/dist/svn-redcta/gnome-theme-xp/change-default-to-xp.sh":
38        ensure => "present",
39        owner => "root", group => "root", mode => "755", checksum => mtime,
40    }
41
42    file { "$lucid_file_path":
43        ensure => "present",
44        owner => "root", group => "root", mode => "755", checksum => mtime,
45    }
46
47    #   Esto no deberia hacerse, solamente habria usar ejecutar, lo dejo por jaunty
48    #   ver changeset [643]
49    #   falta poner refresh = true en lucid
50    case $operatingsystem {
51        Ubuntu: {
52            case $lsbdistcodename {
53                Jaunty: {
54                    exec { "$jaunty_file_path":
55                    refreshonly => true,
56                    subscribe => File["/dist/svn-redcta/gnome-theme-xp/change-default-to-xp.sh"]
57                    }
58                }
59                Lucid: {
60                    exec { "$lucid_file_path":
61                    refreshonly => true,
62                    subscribe => File["$lucid_file_path"]
63                    }
64                }
65                default: {
66                    err("No hay tema para $operatingsystem - $lsbdistcodename")
67                }   
68            }
69        }
70        default: {
71            err("No hay tema para $operatingsystem")
72        }   
73    }
74}
75
76# desabilitado ver ticket #82
77class escritorio::iconos {
78
79#    file  { "/etc/X11/Xsession.d/65xdg-user-desktop-icons-update":
80#        ensure => "/dist/svn-redcta/gnome-theme-xp/Xsession.d/65xdg-user-desktop-icons-update"
81#    }
82
83}
84
85
86class escritorio::fondos::cta {
87
88    svn::checkout { escritorio-fondos-cta:
89        repository => "https://svn.redcta.org.ar/proyectos/redcta/trunk/escritorio-fondos-cta",
90        local_path => "/dist/svn-redcta",
91        local_name => "escritorio-fondos-cta"
92    }
93
94    file  { "/usr/share/backgrounds/wpiedras-hojitas.jpg":
95        ensure => "/dist/svn-redcta/escritorio-fondos-cta/wpiedras-hojitas.jpg"
96    }
97
98    file { "/usr/share/backgrounds/wpiedras-verdecito.jpg":
99        ensure => "/dist/svn-redcta/escritorio-fondos-cta/wpiedras-verdecito.jpg"
100    }
101}
102
103
104class escritorio::autostart-off {
105
106    define deshabilita_servicios($archivos) {
107        deshabilita_servicio { $archivos: archivo => $name }
108    }
109
110    define deshabilita_servicio($archivo) {
111        file { "${archivo}/$name"  : ensure => present, }
112
113        line { "verdadero$name" :
114            file   => "${archivo}/$name",
115            line   => "X-GNOME-Autostart-enabled=true",
116            ensure => absent,
117        }
118        line { "falso$name":
119            file   => "${archivo}/$name" ,
120            line   => "X-GNOME-Autostart-enabled=false",
121            ensure => present,
122        }
123    }
124
125    case $operatingsystem {
126    Ubuntu: {
127        case $lsbdistcodename {
128            Jaunty: {
129                deshabilita_servicios { "/etc/xdg/autostart":
130                    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" ],
131                }
132            } 
133            Lucid: {
134                deshabilita_servicios { "/etc/xdg/autostart":
135                    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", "nm-applet.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" ],
136                }
137            }
138            default: {
139                err("No hay deshabilitacion de servicios para $opertatingsystem - $lsbdistcodename")
140            }
141        }
142    }
143    default: {
144        err("No hay deshabilitacion de servicios para $operatingsystem")   
145    }
146    }   
147}
148
Note: See TracBrowser for help on using the repository browser.