Home > HOW-TOs > Trocando o Tema do GDM por um escolhido aleatoriamente

Trocando o Tema do GDM por um escolhido aleatoriamente

November 25th, 2004

Colabora??o: Ederson Leme Corr?a

Quem n?o gosta de um desktop bonito ?

Bom, eu pelo menos gosto. Acho que d? mais ?nimo pra ficar
horas em frente ao micro. E nessa minha busca por tornar meu
desktop mais atraente aos olhos, acabei por encontrar v?rios
temas para o GDM (Gerenciador de Login para o Gnome) e como
um bom indeciso que sou, fiquei na d?vida de qual usar.

Ent?o pensei: Por qu? n?o usar todos ?

Mas ficar trocando manualmente ? muito chato e
“trabalhoso”, ent?o ap?s algumas consultas ao Or?culo
(http://www.google.com.br), acabei por encontrar um script que
ap?s pequenas altera??es ficou perfeito para o meu prop?sito.

Chega de papo, e vamos ao que interessa: O script:

#!/bin/bash
#
# Description: This script modifies the GDM theme for other randomly chosen.
# Description: Based in script posted by va7dav in http://gnome-hacks.jodrell.net/hacks.html?id=17
#
# Autor: Ederson L. Correa
# Date: 04 November 2004
# File: /etc/rc.d/rc.gdmrandom
# Last update: 04/11/2004
#

THEME_DIR=/usr/share/gdm/themes
THEMES=`ls -1 “$THEME_DIR”`
N=`echo $THEMES | wc -w`
((N=RANDOM%N+1))

# The -i.old option creates a backup copy called
# gdm.conf.old
sed -i.old s/GraphicalTheme=.*/GraphicalTheme=`echo $THEMES | cut -d ‘ ‘ -f $N`/ /etc/X11/gdm/gdm.conf

O que esse script faz ? escolher “aleatoriamente” um dentre os
temas disponiveis no diret?rio configurado em THEME_DIR. Assim,
cada vez que esse script for executado (como root) o tema do
GDM ser? trocado.

Voc? pode colocar esse script para rodar no cron de tempos em
tempos, ou na hora do boot, ou na hora do reboot, ou a cada
vez que voc? deslogar ou logar numa sess?o gr?fica. Isso fica
a gosto do fregu?s.

No meu caso, como eu ligo o PC de manh? e este permanece ligado
e logado o dia todo, preferi colocar esse script para rodar no
boot, assim, todo dia tenho uma tela de login diferente … :D

Para isso fiz o seguinte no meu Slack:

1. Criei um arquivo chamado /etc/rc.d/rc.gdmrandom com o conte?do do script acima.
2. Tornei execut?vel: chmod +x /etc/rc.d/rc.gdmrandom
3. Acrescentei as seguintes linhas ao /etc/rc.d/rc.local:

# Pequeno Script que troca o tema do GDM aleatoriamente
if [ -x /etc/rc.d/rc.gdmrandom ]; then
echo “Changing the GDM Theme for a random one: “
. /etc/rc.d/rc.gdmrandom
fi

Assim, quando eu quiser desabilitar a mudan?a dos temas basta
eu retirar a permiss?o de execu??o do rc.gdmrandom.

Voc? pode adaptar isso para a sua distro.

Pra finalizar queria indicar alguns temas que eu achei muito
legais.

Baseados em Animes
==================

- Rurouni Kenshin (http://themes.freshmeat.net/projects/samuraix-gdmtheme/)
- Blue Rei GDM (http://themes.freshmeat.net/projects/bluereigdm/)
- I am not a doll (http://themes.freshmeat.net/projects/notadoll/)
- Dita and Hibiki from Vandread (http://themes.freshmeat.net/projects/ditaandhibiki/)
- Dita (http://themes.freshmeat.net/projects/dita/)
- Super Vandread (http://themes.freshmeat.net/projects/vandread/)
- Magna Carta GDM (http://www.gnome-look.org/content/show.php?content=13563)
- GDM Gartoon theme (http://www.gnome-look.org/content/show.php?content=13510)

Baseados em Filmes
==================

- [Fly Spider (http://www.gnome-look.org/content/show.php?content=17386]
- [Octopus GDM (http://www.gnome-look.org/content/show.php?content=13451]
- [The Matrix Reloaded (http://www.gnome-look.org/content/show.php?content=13381]
- [Matrix Reloaded GDM Theme (http://themes.freshmeat.net/projects/matrix_gdm/]
- [The Two Towers (http://themes.freshmeat.net/projects/thetwotowers/]

Diversos
========

- [SamothAngel GDM (http://themes.freshmeat.net/projects/angelgdmtheme/]
- [Shogun (http://themes.freshmeat.net/projects/shogun/]
- [Penguin Computing (http://art.gnome.org/themes/gdm_greeter/272/]
- [Angel (http://art.gnome.org/themes/gdm_greeter/89/]

Bom, voc?s tamb?m podem achar muito outros temas em:

- [GNOME-Look.org (http://www.gnome-look.org/index.php?xcontentmode=150]
- [art.gnome.org (http://art.gnome.org/themes/gdm_greeter/]
- [freshmeat.net (http://themes.freshmeat.net/browse/991/]

——————————————————————–
Colabore com a Dicas-L. Publique seu coment?rio sobre esta mensagem
em http://www.Dicas-L.unicamp.br/dicas-l/20041124.php
——————————————————————–
As mensagens da lista Dicas-L s?o veiculadas diariamente
para 26010 assinantes.

Todas as mensagens da Dicas-L ficam armazenadas em
http://www.Dicas-L.unicamp.br/dicas-l/

A redistribui??o desta e outras mensagens da lista Dicas-L pode
ser feita livremente, desde que o conte?do, inclusive esta nota,
n?o sejam modificados.
——————————————————————–

HOW-TOs

  1. No comments yet.
  1. December 4th, 2008 at 10:23 | #1
  2. December 6th, 2008 at 04:58 | #2
  3. December 6th, 2008 at 09:30 | #3
  4. December 6th, 2008 at 18:08 | #4
  5. December 7th, 2008 at 01:54 | #5
  6. December 7th, 2008 at 09:32 | #6
  7. December 7th, 2008 at 21:58 | #7
  8. December 9th, 2008 at 08:22 | #8
  9. December 10th, 2008 at 02:46 | #9
  10. December 10th, 2008 at 04:28 | #10
  11. December 10th, 2008 at 17:49 | #11
  12. December 11th, 2008 at 00:35 | #12
  13. December 11th, 2008 at 01:50 | #13
  14. December 11th, 2008 at 09:57 | #14
  15. December 11th, 2008 at 20:43 | #15
  16. December 12th, 2008 at 05:33 | #16
  17. December 12th, 2008 at 14:41 | #17
  18. December 12th, 2008 at 23:58 | #18
  19. December 13th, 2008 at 05:33 | #19
  20. December 14th, 2008 at 10:04 | #20
  21. December 15th, 2008 at 03:07 | #21
  22. December 17th, 2008 at 07:58 | #22
  23. December 17th, 2008 at 15:22 | #23
  24. December 17th, 2008 at 23:57 | #24
  25. December 18th, 2008 at 08:52 | #25
  26. December 20th, 2008 at 05:54 | #26
  27. December 20th, 2008 at 13:24 | #27
  28. December 26th, 2008 at 14:07 | #28
  29. January 2nd, 2009 at 16:58 | #29
  30. January 3rd, 2009 at 13:29 | #30
  31. January 7th, 2009 at 02:02 | #31