spike1@xxxxxxxxxxxxx wrote:
> Roy Schestowitz <newsgroups@xxxxxxxxxxxxxxx> did eloquently scribble:
>> Hi,
>
>> A couple of years ago (in SuSE), I was able to get a particular cron job
>> to work. It uses ImageMagick. While I was able to get it to work by
>> running it from the terminal, cron failed. Someone in this newsgroup
>> advised me to precede the job with "export DISPLAY=localhost:0.0", which
>> did the trick. Having changed distributions, however, I am no longer able
>> to get it to work. In fact "export DISPLAY=localhost:0.0" leads to errors
>> when running it from the terminal, so it's now commented out.
>
>> Here is part of the script which I am able to run successfully from the
>> terminal:
>
>> #!/bin/sh
>
>> # export DISPLAY=localhost:0.0
>> # set display (to make cron job work)
>
> change it to just export DISPLAY=:0.0
> forcing localhost also forces tcp/ip rather than direct socket.
>
> For security reasons, tcp/ip is blocked by default in X these days, you
> can still get at it by enabling it in the Xorg.conf or using ssh, but if
> you're only doing it from localhost anyway, you can do it directly. You
> only need to specify a hostname if you're doing it from another machine.
Your suggestion worked like a charm! Thanks a million.
--
~~ Best of wishes
Roy S. Schestowitz | Useless fact: Digits 772-777 of Pi are 999999
http://Schestowitz.com | GNU is Not UNIX | PGP-Key: 0x74572E8E
roy pts/6 cg001a.halls.man Sun Jun 17 09:57 still logged in
http://iuron.com - proposing a non-profit search engine
|
|