Я пытаюсь выяснить, как автоматически переключаться на тему «Рассвет, Свет, Сумерки и полночь» в «Равноденствие» в соответствующее время дня (т. Е. В 6 часов утра он переключается с полуночи на рассвет, в 8 или 9 часов) он переключился бы на свет, 7 вечера переключился бы на сумерки, а 10 вечера переключился бы на полночь)
Я пытаюсь сделать это, используя cron, со следующим crontab:
0 6 * * * gconftool-2 --type = string --set / apps / metacity / general / theme 'equinox-evolution-dawn'
0 8 * * * gconftool-2 --type = string --set / apps / metacity / general / theme 'equinox-evolution-light'
0 19 * * * gconftool-2 --type = string --set / apps / metacity / general / theme 'equinox-evolution-dusk'
0 22 * * * gconftool-2 --type = string --set / apps / metacity / general / theme 'equinox-evolution-midnight'
Это не работает. Я использую Ubuntu 10.10 с Compiz в качестве оконного менеджера
Можете ли вы попробовать этот сценарий? (адаптировано из New Wave-Chronos )
#!/bin/bash # Autor: Narf SS 2009 # Site: http://proyectobs.blogspot.com/ # # Este script cambia el archivo de configuración del tema metacity "New Wave Chronos" #y actualiza el tema. #Para su funcionamiento (sin modificación) debe de ser añadido a la ejecución en el inicio, #y el tema debe de estar instaldo en la carpeta ".theme" del home del usuario. #Y por supuesto seleccionado en la apariencia del escritorio y este mismo script añadido a las aplicacioens de inicio. while [ true ] do hora=`date +%H` case "$hora" in 06|07) # Amanecer gconftool-2 --type=string --set /apps/metacity/general/theme 'equinox-evolution-dawn' ;; 08|09|10|11|12|13|14|15|16|17|18) # Medio dia gconftool-2 --type=string --set /apps/metacity/general/theme 'equinox-evolution-light' ;; 19|20|21) # Atardecer gconftool-2 --type=string --set /apps/metacity/general/theme 'equinox-evolution-dust' ;; 22|23|24|00|01|02|03|04|05) # Madrugada gconftool-2 --type=string --set /apps/metacity/general/theme 'equinox-evolution-midnight' ;; esac sleep 1h done