Gdm, scegliere il tema di accesso al computer: da tar.gz a .deb
11 dicembre, 2007 6 commenti
Ogni volta che decidevo di cambiare tema in gdm (GDM – The GNOME Display Manager) dovevo uscire dalla sessione o aprirne un’altra per provare “l’effetto che fa”. Ho scoperto da poco l’utilizzo di xnest per provare al volo i cambiamenti, anche se il server Xnest è usato per scopi più nobili. Iniziamo quindi a installare xnest e alien, ci serviranno dopo:
$ sudo apt-get install xnest alien
Un buon punto di partenza è www.gnome-look.org dove, nell’apposita sezione, troverete decine di temi pronti. Nelle fonti (repo) che uso al momento la ricerca della voce gdm theme produce:
$ apt-cache search gdm|grep theme
feisty-gdm-themes - Feisty GDM themes
blubuntu-gdm-theme - Blubuntu look - GDM theme
edgy-gdm-themes - Edgy GDM themes
gdm-themes - Themes for the GNOME Display Manager
mythbuntu-gdm-theme - mythbuntu gdm greeter theme
peace-gdm-theme - Peace look - GDM theme
tropic-gdm-theme - Tropic look - GDM theme
ubuntustudio-gdm-theme - Ubuntu Studio - GDM theme
mentre quelli che ho installati ora sono:
$ dpkg -l|grep gdm-theme
ii feisty-gdm-themes 0.22 Feisty GDM themes
ii peace-gdm-theme 0.2-0ubuntu1 Peace look – GDM theme
ii tropic-gdm-theme 0.2-0ubuntu1 Tropic look – GDM theme
ii ubuntustudio-gdm-theme 0.14 Ubuntu Studio – GDM theme
Uno che mi sembra bello graficamente è invece Ubuntu+Glossy+Orange+GDM (di Alejandro Arrizabalaga)
I files che gestiscono il GDM sono /etc/gdm.gconf e /etc/gdm/gdm.conf-custom, in particolare le righe:
$ grep -i theme /etc/gdm/gdm.conf|grep -v “#”
GtkTheme=Human
GraphicalTheme=Human
GraphicalThemeDir=/usr/share/gdm/themes/
GraphicalThemeRand=false
$ grep -i theme /etc/gdm/gdm.conf-custom|grep -v “#”
GraphicalTheme=ubuntu_glossy_orange
cioè mi sembra di capire che il file /etc/gdm/gdm.conf-custom ha la priorità, ma non posso confermarlo al 100%.
Il funzionamento è semplice e si attua in pochi passaggi: se vi interessa un tema in particolare, è sufficiente copiarlo in /usr/share/gdm/themes/ e usare il nome della directory “miotema” in questo modo:
GraphicalTheme=miotema
Oppure ancora più facilmente usando “sudo gdmsetup” scegliendo il vostro preferito dall’elenco.
E poi?
A questo punto prima di aprire la sessione potete testare il tutto con un solo comando:
$ gdmflexiserver - - xnest
(okkio, wordpress di solito trancia i due trattini)
Se invece volete usare, o meglio gestire i temi scaricati da gnome-look.org, vi consiglio di convertire i files compressi tar.gz in .deb con l’uso di “alien“, stando attenti a usare il tar.gz che create voi, rispettando così l’albero /usr/share/gdm/themes. Questo perchè gli archivi scaricati come directory contengono solo il nome del tema
Vediamo un esempio:
$ tar zxfv ubuntu_glossy_orange_gdm.tar.gz
drwxr-xr-x root/root 0 2006-11-16 22:26 Ubuntu Glossy Orange/ -rw-r--r-- root/root 58035 2006-11-16 22:47 Ubuntu Glossy Orange/ubuntu.png -rw-r--r-- root/root 693 2006-11-16 22:26 Ubuntu Glossy Orange/icon-shutdown-prelight.png -rw-r--r-- root/root 727 2006-11-16 22:26 Ubuntu Glossy Orange/icon-shutdown.png -rw-r--r-- root/root 515 2006-11-16 22:26 Ubuntu Glossy Orange/icon-shutdown-active.png -rw-r--r-- root/root 1045 2006-11-16 22:26 Ubuntu Glossy Orange/icon-session-prelight.png -rw-r--r-- root/root 884 2006-11-16 22:26 Ubuntu Glossy Orange/icon-session.png -rw-r--r-- root/root 835 2006-11-16 22:26 Ubuntu Glossy Orange/icon-session-active.png -rw-r--r-- root/root 635 2006-11-16 22:26 Ubuntu Glossy Orange/icon-reboot-prelight.png -rw-r--r-- root/root 670 2006-11-16 22:26 Ubuntu Glossy Orange/icon-reboot.png -rw-r--r-- root/root 456 2006-11-16 22:26 Ubuntu Glossy Orange/icon-reboot-active.png -rw-r--r-- root/root 729 2006-11-16 22:26 Ubuntu Glossy Orange/icon-language-prelight.png -rw-r--r-- root/root 541 2006-11-16 22:26 Ubuntu Glossy Orange/icon-language-active.png -rw-r--r-- root/root 7724 2006-11-16 22:26 Ubuntu Glossy Orange/Human.xml -rw-r--r-- root/root 600 2006-11-16 22:26 Ubuntu Glossy Orange/icon-language.png -rw-r--r-- root/root 330 2006-11-16 22:26 Ubuntu Glossy Orange/GdmGreeterTheme.desktop -rw-r--r-- root/root 23004 2006-11-16 22:46 Ubuntu Glossy Orange/screenshot.png -rw-r--r-- root/root 694074 2006-11-16 22:26 Ubuntu Glossy Orange/background.png -rw-r--r-- root/root 7724 2006-11-16 22:26 Ubuntu Glossy Orange/Human.xml.bak
Per convertirlo in archivio .deb è necessario creare la dir
/usr/share/gdm/themes/ubuntu_glossy_orange
e copiare tutto il contenuto lì dentro, magari personalizzando il tema (il file è xml) oppure modificandolo, secondo la licenza, e quindi creare il nuovo file .tar.gz
$ tar zcvfp ubuntu_glossy_orange.tar.gz /usr/share/gdm/themes/ubuntu_glossy_orange/
tar: Rimuovo il `/’ iniziale dai nomi dei membri
/usr/share/gdm/themes/ubuntu_glossy_orange/
/usr/share/gdm/themes/ubuntu_glossy_orange/icon-reboot-active.png
/usr/share/gdm/themes/ubuntu_glossy_orange/icon-shutdown-active.png
/usr/share/gdm/themes/ubuntu_glossy_orange/screenshot.png
/usr/share/gdm/themes/ubuntu_glossy_orange/icon-session.png
/usr/share/gdm/themes/ubuntu_glossy_orange/ubuntu.png
/usr/share/gdm/themes/ubuntu_glossy_orange/icon-session-active.png
/usr/share/gdm/themes/ubuntu_glossy_orange/background.png
/usr/share/gdm/themes/ubuntu_glossy_orange/icon-language.png
/usr/share/gdm/themes/ubuntu_glossy_orange/icon-session-prelight.png
/usr/share/gdm/themes/ubuntu_glossy_orange/icon-reboot-prelight.png
/usr/share/gdm/themes/ubuntu_glossy_orange/icon-language-active.png
/usr/share/gdm/themes/ubuntu_glossy_orange/icon-language-prelight.png
/usr/share/gdm/themes/ubuntu_glossy_orange/icon-reboot.png
/usr/share/gdm/themes/ubuntu_glossy_orange/Human.xml
/usr/share/gdm/themes/ubuntu_glossy_orange/icon-shutdown-prelight.png
/usr/share/gdm/themes/ubuntu_glossy_orange/Human.xml.bak
/usr/share/gdm/themes/ubuntu_glossy_orange/GdmGreeterTheme.desktop
/usr/share/gdm/themes/ubuntu_glossy_orange/icon-shutdown.png
e adesso possiamo usare alien:
$ sudo alien -d ubuntu_glossy_orange.tar.gz
ubuntu-glossy-orange_1-2_all.deb generated
così infine possiamo installarlo con:
sudo dpkg -i ubuntu-glossy-orange_1-2_all.deb
!! anche se questa operazione sovrascrive l’archivio vecchio !! (/usr/share/gdm/themes/ubuntu_glossy_orange), in quanto non risulta nel db dei pacchetti, quindi se avete fatto modifiche importanti: BACKUP!
Per verificare se il pacchetto appare nel sistema è sufficiente:
$ dpkg -l|grep glossy
ii ubuntu-glossy-orange 1-2 Converted Slackware tgz package







Complimenti!!!
hai curato minuziosamente ogni singolo passaggio, rendendo il tutto molto chiaro.
Sicuramente con questo post risolverai il problema di molte persone che desiderano personalizzare graficamente la propria ubuntu….e spero vivamente anke il mio
@Serenella
Grazie dei complimenti :->
ho dimenticato di dire che la documentazione si trova su:
http://www.gnome.org/projects/gdm/docs/2.20/gdm.html
Ciao
Antonio
Io mi trovo bene ad installare i temi .tar.gz direttamente dall’interfaccia grafica di Gnome, comunque ben fatto.
@Lazza
si certo, ma così è gestibile come pacchetto
Ciao e grazie,
Antonio
Ciao, scusa, ma se uno volesse semplicemente ripristinare la grafica di default come deve fare?
(thanks)
@Massimo Moruzzi
Basta ripristinare le righe modificate in gdm.conf, oppure più drasticamente disinstallare gdm (con l’opzione –purge) e reinstallarlo
I temi di default (anche per gutsy) sono compresi nel pacchetto “feisty-gdm-themes” : Human HumanCircle HumanList
Ad ogni modo i files interessati sono:
/etc/gdm/gdm.conf
/etc/gdm/gdm.conf-custom
Ciao,
Antonio