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

Re: Program started from cron cannot open display:?



on Tue, Oct 24, 2000 at 10:46:22PM +0200, John Ericson (john@john.pp.se) wrote:
> On Oct 24 11:09, kmself@ix.netcom.com wrote:
> > on Tue, Oct 24, 2000 at 03:39:53AM +0200, John Ericson (john@john.pp.se) wrote:
> > > I'm trying to launch a local Gnome program on my local X from crontab but in my
> > > mail report from the cron it says:
> > > 
> > > Gtk-WARNING **: cannot open display:
> > > 
> > > And the program won't come up. My display is :0 and yes, X is running.
> > > 
> > > Can anyone give me a hint here? 
> > 
> > xauth?
> > 
> > (you asked for a hint).
> > 
> I have an ~/.Xauthority file. But the program from the cron is runned as the
> same user using the X server on the same computer. Then I shouldn't have to
> list and add lines from the .Xauthority file, I think or I'm wrong here?

Are you specifying a display for the X client?  Following works:

    [karsten@angel:karsten]$ batch
    warning: commands will be executed using /bin/sh
    at> export DISPLAY=:1
    at> xlogo & 
    at> <EOT>
    job 66 at 2000-10-24 14:24

Note that cron, at, and batch will inherit the current environment, so
if you use different X displays, you may run into trouble.

-- 
Karsten M. Self <kmself@ix.netcom.com>     http://www.netcom.com/~kmself
 Evangelist, Opensales, Inc.                    http://www.opensales.org
  What part of "Gestalt" don't you understand?      There is no K5 cabal
   http://gestalt-system.sourceforge.net/        http://www.kuro5hin.org
GPG fingerprint: F932 8B25 5FDD 2528 D595 DC61 3847 889F 55F2 B9B0

Attachment: pgphHlbr3Y3vq.pgp
Description: PGP signature


Reply to: