[Top][All Lists]

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

Re: Using gnuplot with in a Linux console

From: Christian Burger
Subject: Re: Using gnuplot with in a Linux console
Date: Wed, 3 Mar 1999 12:27:23 +0100 (MET)

On 3 Mar 1999, "John W. Eaton" <address@hidden> wrote:
> On 18-Feb-1999, Jim Van Zandt <address@hidden> wrote:
> | On my Debian system, gnuplot is setuid root:
> | 
> | -rwsr-xr-x   1 root  root   585692 Sep 23 01:01 /usr/bin/gnuplot
> | 
> | This allows an ordinary user to plot to the console with gnuplot.  It
> | still doesn't run under octave, though.
> Sorry, I can't easily debug this problem, so in order for it to be
> fixed, someone else is going to have to determine that it is really a
> bug in Octave and also explain how to fix the problem (working code
> would probably speed things up too).

It is not an octave bug but a gnuplot problem.

gnuplot's term/linux.trm contains:

    if ((pipe = popen("/usr/bin/tty", "r")) != NULL) {
        line[0] = 0;
        fgets(line, 256, pipe);
        line[strlen(line) - 1] = '\0';
        if (strcmp(line, "/dev/console") == 0 ||
            (strncmp(line, "/dev/tty", 8) == 0 && isdigit(line[8])))
            LINUX_graphics_allowed = TRUE;

This will fail for all kinds of piped input, including octave's.

I'm not exactly sure how to fix it in a nice way. Commenting out this code
fragment more or less works but then there are problems getting back to
the octave prompt when the vgalib graphics is on the screen.


Christian Burger, MPI Colloids & Interfaces, D-14513 Teltow, Germany
e-mail: address@hidden, (Phone|FAX): +49-3328-46-(581|599)

reply via email to

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