Re: [SLUG] x window tk script to run from cron

From: Paul M Foster (paulf@quillandmouse.com)
Date: Sun Feb 27 2005 - 15:43:44 EST


On Sun, Feb 27, 2005 at 02:30:06PM -0500, Larry Brown wrote:

> On Sun, 2005-02-27 at 14:16, Larry Brown wrote:
> > On Sun, 2005-02-27 at 14:01, Paul M Foster wrote:
> >
> > >
> > > Cron doesn't run in an X environment. So if it's trying to launch an
> > > X-based application (which is what it sounds like), it's going to fail
> > > on that part. Most X apps launched from an xterm can detect that they're
> > > running in an X environment and launch properly. But cron doesn't run
> > > that way. I'm guessing that if you try to run any X app from a pure
> > > console (not an xterm, but a real console), you'll get the same or
> > > similar error message.
> > >
> > > Paul
> > >
> >
> > So does this mean that it is not possible to start a gui app from cron?
>
> This can not be the case as I have scheduled the script to run from cron
> after having given "xhost +" and the cron job is able to open the window
> ok. I just need to find out how I can bypass the security measure of
> restricting outside connections from openning my x session while
> allowing this one to connect. I wouldn't mind openning up my x session
> to other users on this box, but specifying "xhost + localhost", "xhost +
> desktop", "xhost + 127.0.0.1" nor "xhost + 192.168.1.10" do it. So how
> do I know what address it thinks it is being connected from to which it
> refuses said connection? The log is only telling me "client 41" or just
> now "client 42".

I'll buy that.

Here's a shot in the dark. Check and see if you have a file either in
the root directory or your home directory called .Xauthority. It has
something to do with X security, but I don't know how it works. It's
just a direction to look in.

Paul
-----------------------------------------------------------------------
This list is provided as an unmoderated internet service by Networked
Knowledge Systems (NKS). Views and opinions expressed in messages
posted are those of the author and do not necessarily reflect the
official policy or position of NKS or any of its employees.



This archive was generated by hypermail 2.1.3 : Fri Aug 01 2014 - 19:42:51 EDT