Re: X program from cron
On 2004-01-15, Antony Gelberg penned:
> Hi all,
>
> I want to update my wallpaper at time intervals. So, I've set up a
> crontab:
> # DO NOT EDIT THIS FILE - edit the master and reinstall.
> # (/tmp/crontab.bCmoxk/crontab installed on Thu Jan 15 21:07:39 2004)
> # (Cron version -- $Id: crontab.c,v 2.13 1994/01/17 03:20:37 vixie Exp
> # $)
> 0 * * * * $HOME/bin/wallpaper_rotate $HOME/pics/wallpaper/
>
> wallpaper_rotate is a dirty shell script:
> #!/bin/sh
> NEXTFILE=`ls $1 | rl -c 1`
> wmsetbg $1$NEXTFILE
>
> Now that's coding. Anyway, it works. However, cron reports:
> wmsetbg fatal error: could not open display
>
> I guess this is because it is not being run from my X session. Question
> is, is there anything I can do to get it to work the way that I want?
>
set $DISPLAY explicitly in the shell script?
--
monique
Reply to: