[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: cron & cannot open display



Elie De Brauwer wrote:

On Sunday 20 July 2003 12:17, David selby wrote:
Hello

I have been trying to get cron to execute programs at set times,
As a test I am trying to execute dillo (loads fast!) I setup cron as
user testbed to execute dillo every five mins,
I get the following ......

From testbed@debian Sun Jul 20 11:10:01 2003
Return-path: <testbed@debian>
Envelope-to: testbed@debian
Received: from testbed by debian with local (Exim 3.35 #1 (Debian))

       for <testbed@debian>; Sun, 20 Jul 2003 11:10:01 +0100
From: root@debian (Cron Daemon)
To: testbed@debian
Subject: Cron <testbed@debian> /usr/X11R6/bin/dillo
X-Cron-Env: <SHELL=/bin/sh>
X-Cron-Env: <HOME=/home/testbed>
X-Cron-Env: <PATH=/usr/bin:/bin>
X-Cron-Env: <LOGNAME=testbed>
Message-Id: <E19eB8j-0000ZK-00@debian>
Sender: CronDaemon <testbed@debian>
Date: Sun, 20 Jul 2003 11:10:01 +0100

Setting locale to C

Gtk-WARNING **: cannot open display:

OK so i know its something to do with $DISPLAY, I tried setting
DISPLAY=:0.0 in a shell then execute dillo, no go ...

I know cron works AOK on non x programs

Can anyone advise ?

Dave

Normally an x program should obey to the -display flag for example if you switch to console, login as root and type
xterm -display :0
A root xterm should appear on you X display. I've tried it with dillo here but dillo just ignores the flag (not implemented yet ?). So try it with a more basic X application like xterm, xclock, xbill ;) ... those should work when you specify the -display flag but first test it from console to verify it works.


hth
Elie De Brauwer

PS works with mozilla
mozilla --display=:0

Dave



Reply to: