[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
- GUI starts up with terminal, Philip Nienhuis, 2012/08/23
- GUI starts up with terminal, John W. Eaton, 2012/08/23
- Re: GUI starts up with terminal, Philip Nienhuis, 2012/08/23
- Re: GUI starts up with terminal, Laurent Hoeltgen, 2012/08/23
- Re: GUI starts up with terminal, Philip Nienhuis, 2012/08/23
- Re: GUI starts up with terminal,
John W. Eaton <=
- Re: GUI starts up with terminal, Daniel J Sebald, 2012/08/23
- Re: GUI starts up with terminal, Daniel J Sebald, 2012/08/23
- Re: GUI starts up with terminal, Jacob Dawid, 2012/08/24
- Re: GUI starts up with terminal, Daniel J Sebald, 2012/08/24
- Re: GUI starts up with terminal, John W. Eaton, 2012/08/23
- Re: GUI starts up with terminal, John W. Eaton, 2012/08/23
- Re: GUI starts up with terminal, Philip Nienhuis, 2012/08/24
- Re: GUI starts up with terminal, Mike Miller, 2012/08/23
- Re: GUI starts up with terminal, John W. Eaton, 2012/08/24
- Re: GUI starts up with terminal, Mike Miller, 2012/08/24