Собственно сам скрипт
Код: Выделить всё
#!/bin/sh
PICT=$(ls /home/andrew/Walpapers | shuf -n 1)
gsettings set org.gnome.desktop.background picture-uri "file:///home/andrew/Walpapers/$PICT"
exit 0
Запись по crontab -e
Код: Выделить всё
*/1 * * * * /usr/bin/autowalpaper.sh
Код: Выделить всё
Jul 31 07:41:01 localhost CRON[2238]: (andrew) CMD (/usr/bin/autowalpaper.sh)
Jul 31 07:42:01 localhost CRON[2336]: (andrew) CMD (/usr/bin/autowalpaper.sh)
Jul 31 07:43:01 localhost CRON[2389]: (andrew) CMD (/usr/bin/autowalpaper.sh)
Jul 31 07:44:01 localhost CRON[2428]: (andrew) CMD (/usr/bin/autowalpaper.sh)
Jul 31 07:45:01 localhost CRON[2524]: (andrew) CMD (/usr/bin/autowalpaper.sh)
Jul 31 07:46:01 localhost CRON[2643]: (andrew) CMD (/usr/bin/autowalpaper.sh)
Jul 31 07:47:01 localhost CRON[2741]: (andrew) CMD (/usr/bin/autowalpaper.sh)
Jul 31 07:48:01 localhost CRON[2779]: (andrew) CMD (/usr/bin/autowalpaper.sh)
Jul 31 07:49:01 localhost CRON[2859]: (andrew) CMD (/usr/bin/autowalpaper.sh)
Jul 31 07:50:01 localhost CRON[2901]: (andrew) CMD (/usr/bin/autowalpaper.sh)
Jul 31 07:51:01 localhost CRON[2965]: (andrew) CMD (/usr/bin/autowalpaper.sh)
По правам
Код: Выделить всё
-rwxr-xr-x 1 andrew andrew 156 2012-07-31 07:57 /usr/bin/autowalpaper.sh