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.
> From: bill lam
>
> In your patch I notice plot use hostcmd (based on 2!:0) to display
> pdf. This is not an issue of this patch itself. The window
> counter-part use winexec which should behave like spawn so it will not
> wait for child process to terminate. I suggest it would be more
> sensible to use a hostcmd that based on 2!:1, Similarly for browser
> command, but wait, how to get help inside jconsole?
>
>
> Index: plot/out/pdf/util.ijs
> ===================================================================
> --- plot/out/pdf/util.ijs (revision 532)
> +++ plot/out/pdf/util.ijs (working copy)
> @@ -73,11 +73,13 @@
> else.
> info msg,'The file name is invalid.' return. end.
> end.
> -if. 0 = 4!:0 <'PDFREADER_j_' do.
> - if. IFUNIX do.
> - hostcmd (dquote PDFREADER_j_),' ',dquote file
> - else.
> - wd 'winexec *',PDFREADER_j_,' ',dquote file
> +if. VISIBLE *. 0 = 4!:0 <'PDFREADER_j_' do.
> + if. #PDFREADER_j_ do.
> + if. IFUNIX do.
> + hostcmd (dquote PDFREADER_j_),' ',dquote file
> + else.
> + wd 'winexec *',PDFREADER_j_,' ',dquote file
> + end.
> end.
> end.
> )
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm