X and Fluxbox :: bsetbg and cron



I installed DSL to the HardDrive, enabled Apt-Get and installed Cron (Vixie_corn).

I want to make my backround change every 5 min. I wrote a script and ran it. All good

I added to the dsl user's crontab the script and nothing happens.
So I started  debuging and I have confirmed that the script is running but that the command
Code Sample
bsetbg -f ~/1.jpg
is not working when cron executes it.

I have also tried putting the full path /usr/bin/bsetbg ... w/o any luck

Any help would be appreciated.

XenoCyber

Have you tried putting the full path to your home directory? i.e. not ~/1.jpg but /home/dsl/1.jpg
I have the following Cron tab file for dsl user
Code Sample

* * * * * /usr/bin/bsetbg -f "/home/dsl/1.jpg"
* * * * * /home/dsl/change > /home/dsl/1.txt


The fisrt line is debug and shaows that bsetbg dosent work
the second line actually is a script I wrote That also has some simple commands like "ls" and "pwd"  that show up in the out put file confirming that the cron job is running every min

XenoCyber

Weird. I assume you've verified that /usr/bin/bsetbg -f "/home/dsl/1.jpg" works when not called from cron? Try redirecting the output of the bsetbg command so you can see the error that is generated.

Code Sample
/usr/bin/bsetbg -f "/home/dsl/1.jpg">/home/dsl/error.txt 2>&1

Could it be that the DISPLAY variable isn't set?
Next Page...
original here.