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: Daniel J Sebald
Subject: Re: GUI starts up with terminal
Date: Thu, 23 Aug 2012 16:45:46 -0500
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.24) Gecko/20111108 Fedora/3.1.16-1.fc14 Thunderbird/3.1.16

On 08/23/2012 04:22 PM, 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?

I think those launcher things can have their "command" adjusted. So it would be possible to define that launcher as "octave --use-gui", for example.

But going the other direction? I'd kind of prefer to not have to start Octave from the command line without gui as

octave --no-gui

Please add an option in the settings file because I quite often use octave in a minimalist fashion. If I'm working on something and quickly need to add a string of numbers or compute something I use octave like an advanced calculator because it starts quickly on my current system. The alternate is to use the mouse to look under "Applications", find the calculator (if it will suffice) and type away. But "ten fingers beats one finger plus mouse" applies in the minimalist case. Sure that applies to the GUI as well, but unless I'm in a big project frame of mind, the command line will do.


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?

To me, that is preferred. It used to be that one could define the command used by the OS GUI menu item (I forgot, what has been added to Octave is actually and IDE... IDE-O! Bring your ideas to life... so --force-ide is what it should be) in those menus. I imagine it is still done that way, but more behind the scenes.

Dan


reply via email to

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