octave-maintainers
[Top][All Lists]
Advanced

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

Re: GUI starts up with terminal


From: Mike Miller
Subject: Re: GUI starts up with terminal
Date: Fri, 24 Aug 2012 10:07:04 -0400

On Fri, Aug 24, 2012 at 6:58 AM, John W. Eaton wrote:
> On 23-Aug-2012, Mike Miller wrote:
>
> | On Thu, Aug 23, 2012 at 05:22:42PM -0400, John W. Eaton wrote:
> | >  1. octave myfile.m
> | >  2. echo "x = 1" | octave
> | >  3. octave < myfile.m
> |
> | Slight aside, after reading this, and not using 2 and 3 myself, I see
> | that octave does not support the "-" argument convention to indicate
> | stdin, it rather tries to load a file named "-". I think that's worth
> | handling also.
>
> Why is that needed?  I've typically seen that for programs that can
> accept multiple file names on the command line, but Octave only
> accepts one, so I'm not sure I see why we would want to write
>
>   echo "x = 1" | octave -

Yes, and I'm not sure of a case where it would be useful off the top
of my head, just convention. POSIX standards say "should be used to
mean standard input", not "shall" or "must" so it's up to the
application. But it does allow the usage without losing anything.
Anyway, this was OT.

> | How about testing argv[0] to see if it is "octave-gui" and treat it like
> | --force-gui? Then you have octave, which can be either CLI or GUI,
> | octave-cli, and octave-gui.
>
> I'd prefer to avoid changing behavior based on what the program is
> named.  That is not how octave-cli works.  It's a completely different
> binary that is not even linked with the GUI toolkit.
>
> If we were to have a separate octave-gui binary, I guess I would have
> it skip the tests for input from stdin or a file name passed as command
> line argument and always start the GUI.  But I don't know whether that
> is really necessary given that we have the --force-gui option.

Yes, I suggested this purely for appearance, but functionally no
different from --force-gui which works for me.

More on-topic, I tested running the GUI from a launcher and it still
has some quirks with the pager and info browser, which I think are all
due to qterminal not setting TERM to declare its terminal
capabilities. Once I setenv("TERM", "xterm") everything looks alright.
I'll report that separately.

-- 
mike


reply via email to

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