bsetbg and cronForum: X and Fluxbox Topic: bsetbg and cron started by: xenocyber Posted by xenocyber on June 08 2005,19:53
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
I have also tried putting the full path /usr/bin/bsetbg ... w/o any luck Any help would be appreciated. XenoCyber Posted by friedgold on June 08 2005,23:25
Have you tried putting the full path to your home directory? i.e. not ~/1.jpg but /home/dsl/1.jpg
Posted by xenocyber on June 09 2005,02:10
I have the following Cron tab file for dsl user
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 Posted by friedgold on June 09 2005,13:49
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.
Posted by skaos on June 09 2005,14:40
Could it be that the DISPLAY variable isn't set?
Posted by xenocyber on June 09 2005,14:48
the DISPLAY var not being set sounds plausible since cron runs from within its own shell w/o envitorment options I think. What code would I need to set the DISPLAY variable before running bsetbg? Thanks friedgold , skaos for the help XenoCyber Posted by xenocyber on June 09 2005,15:36
the DISPLAY var not being set sounds plausible since cron runs from within its own shell w/o envitorment options I think. What code would I need to set the DISPLAY variable before running bsetbg? Thanks friedgold , skaos for the help XenoCyber Posted by skaos on June 09 2005,17:36
export DISPLAY=localhost:0.0You probably also need the full path to export - I don't have a DSL box nearby and on a Vector Linux box I couldn't find the full path(?). |