PDA

View Full Version : running java applet/gui from cron?


Al
2003-09-24, 06:44 PM CDT
I've been attempting to run a small java applet via a cron on linux with the
following command:

50 * * * * /home/usr/java/program/;java runScript

I know runScript is running but the gui never pops up, what am I doing
wrong? I tried the java page but noone gave me a good response, It's
probably a path/or environment I need to source but not having much luck.

Thanks in advance

Paul Lutus
2003-09-24, 08:40 PM CDT
Al wrote:

> I've been attempting to run a small java applet via a cron on linux with
> the following command:
>
> 50 * * * * /home/usr/java/program/;java runScript
>
> I know runScript is running but the gui never pops up, what am I doing
> wrong? I tried the java page but noone gave me a good response, It's
> probably a path/or environment I need to source but not having much luck.

You haven't identified a user to cron (some distributions allow this, some
do not), and even if you had, that user process would not "own" the X
process at that point in time, so it cannot launch an X frame to host the
Java application.

Do it by stages. First log on as two different users in two different X
sessions. Then experiment with making a GUI application from one X session
appear in the environment of the other. See what works, and what doesn't.

--
Paul Lutus
http://www.arachnoid.com