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 18:15:20 -0400

On 23-Aug-2012, John W. Eaton wrote:

| 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?

I checked in the following change:

  http://hg.savannah.gnu.org/hgweb/octave/rev/a44e4a08fc55

Does this allow you to start Octave from a launcher without a terminal
using the command line "octave --force-gui"?  That seems to work for
me with a custom desktop application launcher in Gnome 3.

jwe


reply via email to

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