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: Philip Nienhuis
Subject: Re: GUI starts up with terminal
Date: Fri, 24 Aug 2012 17:16:45 +0200
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.11) Gecko/20100701 SeaMonkey/2.0.6

John W. Eaton wrote:
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.

Yes it does, at least, using the "Run" command in the "Start Menu" from LXDE. Yesterday Octave wouldn't start with that command line. The other launch options now also don't need a terminal any more.

Thank you very much.

But there's always a catch.... now I see that messages about e.g., shadowing core functions, come before the "official" startup message:

===========<VERBATIM>==============
warning: function ./strread.m shadows a core library function
GNU Octave, version 3.7.0+
Copyright (C) 2012 John W. Eaton and others.
This is free software; see the source code for copying conditions.
There is ABSOLUTELY NO WARRANTY; not even for MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE.  For details, type `warranty'.

Octave was configured for "i686-pc-linux-gnu".

Additional information about Octave is available at http://www.octave.org.

Please contribute if you find this software useful.
For more information, visit http://www.octave.org/help-wanted.html

Read http://www.octave.org/bugs.html to learn how to submit bug reports.

For information about changes from previous versions, type `news'.

octave:1>
===========</VERBATIM>==============


Philip


reply via email to

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