[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: svgalib

From: John W. Eaton
Subject: Re: svgalib
Date: Mon, 22 Sep 2003 23:00:31 -0500

On 22-Sep-2003, A. S. Budden <address@hidden> wrote:

| Thus spake John W. Eaton:
| > On 22-Sep-2003, A. S. Budden <address@hidden> wrote:
| > 
| > Does
| > 
| >   bash> echo "set term linux; plot sin(x);" | gnuplot
| > 
| > work on your system?
| Does a similar thing to starting in octave -- [svgalib: allocated
| virtual console #8] and on virtual console 8 I get the gnuplot window
| but no graph is seen.
| I guess this is a gnuplot problem then.  I don't suppose you have any
| idea what's causing it do you?

Looking at linux.trm in the gnuplot sources, it appears that they try
to run /usr/bin/tty and look at what it prints.  If it is one of
/dev/console, /dev/tty, or /dev/vc/, or if the environment variable
STY is set to a value like N.ttyM.HOST, then graphics are allowed,
otherwise it exits.  This last feature is apparently used to allow the
screen utility to work with the gnuplot linux terminal type.  What
happens if you do something like

  bash> export STY=1.tty1.foobar
  bash> echo "set term linux; plot sin(x);" | gnuplot

or perhaps

  echo "set term linux; plot sin(x);" | ( export STY=1.tty1.foobar;  gnuplot )


Yes, it's a bit of a kluge, but it seems that although the value of
the STY environment variable is parsed, the results are never used for
anything other than deciding whether graphics should be allowed.

If this works, then you could write a wrapper script to set the
variable in the environment then invoke gnuplot.  Something like

  #! /bin/sh
  export STY=1.tty1.foobar
  exec gnuplot "$@"

and then set Octave's gnuplot binary to be the name of this script.


Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:
How to fund new projects:
Subscription information:

reply via email to

[Prev in Thread] Current Thread [Next in Thread]