我有一個python腳本,通過gconf將桌面牆紙正確設置爲給定文件夾中的隨機圖片。用戶Crontab + Python +隨機壁紙=不工作?
然後我在我的crontab
* * * * * python /home/bolster/bin/change-background.py
和Syslog以下條目正確地報告執行
Apr 26 14:11:01 bolster-desktop CRON[9751]: (bolster) CMD (python /home/bolster/bin/change-background.py)
Apr 26 14:12:01 bolster-desktop CRON[9836]: (bolster) CMD (python /home/bolster/bin/change-background.py)
Apr 26 14:13:01 bolster-desktop CRON[9860]: (bolster) CMD (python /home/bolster/bin/change-background.py)
Apr 26 14:14:01 bolster-desktop CRON[9905]: (bolster) CMD (python /home/bolster/bin/change-background.py)
Apr 26 14:15:01 bolster-desktop CRON[9948]: (bolster) CMD (python /home/bolster/bin/change-background.py)
Apr 26 14:16:01 bolster-desktop CRON[9983]: (bolster) CMD (python /home/bolster/bin/change-background.py)
但是,沒有desktopy changey,任何想法?
您是否看到gconf-editor中的值更改?如果您從gconf-editor中設置值,壁紙是否會更改? – Thomas 2010-04-26 13:24:40
是的,是的,正如我所說,腳本工程以外的cron調用只是〜/ bin/change-background.py和python〜/ bin/change-background.py – Bolster 2010-04-26 13:28:29