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

Last change on this file since 696 was 695, checked in by josx@…, 14 years ago

Poniendo los iconos en el Escritorio #82

File size: 5.5 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
77class escritorio::iconos {
78
79    package { [ "xdg-utils" ]: ensure => installed }
80   
81    # Modificamos el archivo xdg-desktop-icon porque solo funcionaba para el directorio Desktop     
82    file { "/usr/bin/xdg-desktop-icon":
83        owner   => root,
84        group   => root,
85        mode    => 755,
86        source  => "puppet:///escritorio/xdg/xdg-desktop-icon",
87        require => Package["xdg-utils"]
88    }
89
90    file  { "/etc/X11/Xsession.d/65xdg-user-desktop-icons-update":
91        ensure => "/dist/svn-redcta/gnome-theme-xp/Xsession.d/65xdg-user-desktop-icons-update"
92    }
93
94}
95
96
97class escritorio::fondos::cta {
98
99    svn::checkout { escritorio-fondos-cta:
100        repository => "https://svn.redcta.org.ar/proyectos/redcta/trunk/escritorio-fondos-cta",
101        local_path => "/dist/svn-redcta",
102        local_name => "escritorio-fondos-cta"
103    }
104
105    file  { "/usr/share/backgrounds/wpiedras-hojitas.jpg":
106        ensure => "/dist/svn-redcta/escritorio-fondos-cta/wpiedras-hojitas.jpg"
107    }
108
109    file { "/usr/share/backgrounds/wpiedras-verdecito.jpg":
110        ensure => "/dist/svn-redcta/escritorio-fondos-cta/wpiedras-verdecito.jpg"
111    }
112}
113
114
115class escritorio::autostart-off {
116
117    define deshabilita_servicios($archivos) {
118        deshabilita_servicio { $archivos: archivo => $name }
119    }
120
121    define deshabilita_servicio($archivo) {
122        file { "${archivo}/$name"  : ensure => present, }
123
124        line { "verdadero$name" :
125            file   => "${archivo}/$name",
126            line   => "X-GNOME-Autostart-enabled=true",
127            ensure => absent,
128        }
129        line { "falso$name":
130            file   => "${archivo}/$name" ,
131            line   => "X-GNOME-Autostart-enabled=false",
132            ensure => present,
133        }
134    }
135
136    case $operatingsystem {
137    Ubuntu: {
138        case $lsbdistcodename {
139            Jaunty: {
140                deshabilita_servicios { "/etc/xdg/autostart":
141                    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" ],
142                }
143            } 
144            Lucid: {
145                deshabilita_servicios { "/etc/xdg/autostart":
146                    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" ],
147                }
148            }
149            default: {
150                err("No hay deshabilitacion de servicios para $opertatingsystem - $lsbdistcodename")
151            }
152        }
153    }
154    default: {
155        err("No hay deshabilitacion de servicios para $operatingsystem")   
156    }
157    }   
158}
159
Note: See TracBrowser for help on using the repository browser.