On Thu, 5 Aug 2004 18:33:41 -0400, Bill Shirley <[EMAIL PROTECTED]> wrote:
> Did you see this post?  I'm not convinced you are
> exporting the DISPLAY variable.  Can you post your
> script?

 Yeah, I saw it. Sorry I didn't reply at the time, I was busy trying
out all sorts of things and a bit overwhelmed by the unexpected slew
of emails (for which thanks to everyone), and then it sort of got
buried under yet more contributions. I did try this too, and env |
grep DISPLAY gives me DISPLAY=:0.0

A script like:

#!/bin/bash
export DISPLAY=:0.0
/usr/bin/galeon http://www.google.com

with a crontab like:

SHELL=/bin/bash
MAILTO=ger
PATH=/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/usr/games:/usr/lib/jre-1.4.2_04/bin:/home/ger/bin

* * * * * /home/ger/bin/test

won't run from cron. Neither does simply * * * * * /usr/bin/galeon in
the crontab.

It works from the xterm, even after I run unset DISPLAY (if I omit the
"export" in the script above, after I unset DISPLAY I get the
following message at the xterm:
(galeon-bin:2613): Gtk-WARNING **: cannot open display:
I guess this is to be expected.)

I log in from run level 3 and type startx at the command line, but
that doesn't seem to change the behaviour.

Ah well, this is more complex than I'm ready for right now. I found a
workaround, where cron runs cat to update a file, setting it to 0 or
1. Then a background process reads that file and opens a galeon tab if
it finds a 1. It works, and I know why and how - good enough for the
moment. Now I want the script to read a file with several URLs and
check them one by one, just to see if I can. I'm trying to learn shell
scripting, basically, but you guys have so many ideas I can't keep up.

Thanks for all the help.

Germán.

____________________________________________________
Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com
Join the Club : http://www.mandrakeclub.com
____________________________________________________

Reply via email to