|
From: Allin C. <cot...@wf...> - 2007-03-09 03:35:16
|
On Thu, 8 Mar 2007, Ethan A Merritt wrote:
> On Thursday 08 March 2007 18:27, Allin Cottrell wrote:
>>
>> echo "set term png" | `which gnuplot` 2>/dev/null && \
>> gnuplot_png=yes
>>
>> This has worked with versions of gnuplot up to 4.0. I have just
>> updated to version 4.2.0 and it now fails, if the command is not
>> run with the X11 display set.
>
> I can't reproduce this.
>
> bash-3.1$ unset DISPLAY
> bash-3.1$ echo "set term png" | gnuplot_4.2 2>/dev/null && png42=yes
> bash-3.1$ echo $png42
> yes
Hmm, I'll try running that on the target machine the next time I'm
there. Remotely, via ssh, I'm still getting what I described.
Here's a little more detail (plain "gnuplot" is version 4.2.0):
waverley:~$ echo "set term png" | \
/usr/local/bin/gnuplot-4.0 && echo "OK"
OK
waverley:~$ echo "set term png" | \
/usr/local/bin/gnuplot && echo "OK"
gnuplot: unable to open display ''
gnuplot: X11 aborted.
> Let's try to pin down exactly what causes the failure.
Yes, I'd like to do that, will try some more testing.
>> Can anyone suggest a workaround for this? Thanks.
>
> Yes. It would be sufficient to pass in GNUTERM=png
> (or GNUTERM=<anything but x11> for that matter).
>
> bash-3.1$ echo "show term" | GNUTERM=dumb gnuplot_4.2
>
> terminal type is dumb feed 79 24
Yes, that works fine, only you have to parse the response; the
exit status seems to be OK regardless of the GNUTERM setting.
Allin Cottrell
|