xfdesktop in a cron job

houghi houghi at houghi.org
Thu Nov 24 23:11:45 CET 2011


I am running openSUSE 12.1 and I am running a script in cron that I used
to run in 11.4 as well without any problem. Also the cronjob is identical.

However what used to work in 11.4 does not work in 12.1. My best guess
would be here.

The script can be found here http://houghi.org/script/background It
basically changes the background to a one of my several thousand
wallpapers in several hundred directries at random. When I run the script
in a terminal I have no problems.

However when I want to lauch it in a cron job, I get the folloing error:
Failed to parse arguments: Cannot open display

Crontab has the following line:
* * * * *   /usr/local/bin/background

The problem is cause by the following line:
export DISPLAY=:0.0 && xfdesktop --reload 

Even when I use the following I get the same error:
* * * * *  export DISPLAY=:0.0 && /usr/bin/xfdesktop --reload

As far as I can tell I must use the export part to get it working.


houghi
-- 
This is written under the inluence of the following:
>   Artist : Philip Glass
>     Song : The Canyon
>    Album : Itaipu & The Canyon


More information about the Xfce mailing list