On Fri, 26 Jun 2009, Sherlock Ric wrote:
> What you say makes sense to me, but I'm not a big Linux user. Have you tested
> your idea?
>
> Actually though I'm not sure that the code has to be different for Linux vs
> Windows. The code is only for jwdw/jwdp and the winexec command will work for
> both I think?
>
> The following works for me on 32bit Ubuntu 9.04:
>
> load 'plot'
> 'output pdf' plot i.10
> wd 'winexec * /usr/bin/evince ',jpath '~temp/plot.pdf'
>
> So the code could be simplified to:
>
> if. VISIBLE *. 0 = 4!:0 <'PDFREADER_j_' do.
> if. #PDFREADER_j_ do.
> wd 'winexec *',PDFREADER_j_,' ',dquote file
> end.
> end.
>
I tested by setting
hostcmd=: 2!:1
but it still waited for xpdf (my pdf viewer) to terminate. I'm not
sure why 2!:1 did not work as advertised.
But by adding an '&' such that
hostcmd=: [: 2!:0 '(' , ,&' || true)&'
then it works, but I only tested in jconsole not jwd
Since wd is not available for jconsole, it could be
if. VISIBLE *. 0 = 4!:0 <'PDFREADER_j_' do.
if. #PDFREADER_j_ do.
if. IFUNIX*.JCONSOLE do.
hostcmd (dquote PDFREADER_j_),' ',dquote file
else.
wd 'winexec *',PDFREADER_j_,' ',dquote file
end.
end.
end.
)
--
regards,
====================================================
GPG key 1024D/4434BAB3 2008-08-24
gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3
--
regards,
====================================================
GPG key 1024D/4434BAB3 2008-08-24
gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm