Have your script set the DISPLAY environment variable.

export DISPLAY=":0.0"

before running the X command.

(that's assuming bash/sh/ksh. In tcsh it's setenv DISPLAY ":0.0")

On Sun, 26 Jan 2014, Steve Trapp wrote:

> I have used cron in the past to run programs (I edit my "cron table"  via
> < crontab -e >). But, when I try to make cron launch an X-windows program, I
> haven't had any luck. I suspect it might be environment variables, but I
> still haven't had any luck.
>
> I use debian GNU/Linux, and the cron is "Vixie cron" written by Paul Vixie.
> Unable to determine its version number.
>
> Any help would be appreciated. Thanks in advance.
>
>
> -- 
> Name: Steve Trapp
> Homepage: http://steventrapp.home.comcast.net
> Email: stevetrapp **AT** comcast **DOT** net
> Locale: en_US.UTF-8 | Location: Upper Midwest
> _______________________________________________
> TCLUG Mailing List - Minneapolis/St. Paul, Minnesota
> tclug-list at mn-linux.org
> http://mailman.mn-linux.org/mailman/listinfo/tclug-list
>