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: John W. Eaton
Subject: Re: GUI starts up with terminal
Date: Thu, 23 Aug 2012 17:22:42 -0400

I started looking at this.  It's not too hard to separate the command
line option processing from the rest of the startup code, but that
doesn't solve the whole problem.

I'd like to be able to run Octave from a terminal as always, except
that now it will start the GUI by default.  That should not be too
hard to do.  However, we need to know when we can avoid starting the
GUI, for example when there is a filename specified on the command
line or when I/O is coming from a pipe or redirected from a file:

 1. octave myfile.m
 2. echo "x = 1" | octave
 3. octave < myfile.m

Currently we do that by checking whether there are extra arguments
after the options are processed (case 1 above) or by looking
at whether stdin is a tty, by calling "isatty (fileno (stdin))" (cases
2 and 3 above).

That can all still work when Octave is invoked from a terminal.  But
if it is started from a "launcher" menu thing without a terminal, what
happens then?  How can we detect that Octave was started that way?

If there is no way to distinguish between cases 2 and 3 above and
starting Octave from a launcher with no terminal, then would it be
acceptable to require that an option like --force-gui be used to tell
Octave to launch the gui?

jwe


reply via email to

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