4

I installed Octave 3.8.0 using homebrew. The Octave official FAQ says I can use --force-gui option to start octave with the GUI.

But when I use octave --force-gui command in the terminal, nothing happens differently. That is, Octave is still started in command-line interface.

How can I fix that?

3
6

I had a similar problem with Octave 4.0.0, when I installed it as hadi suggested I got this message:

The graphical user interface is disabled by default since it is still buggy on
OS X; use brew with the option --with-gui to enable it.


Octave was compiled with gnuplot; enable it via graphics_toolkit('gnuplot').
All graphics terminals can be used by setting the environment variable GNUTERM
in ~/.octaverc, and building gnuplot with the corresponding options.

setenv('GNUTERM','qt')    # Requiers QT; install gnuplot --with-qt
setenv('GNUTERM','x11')   # Requires XQuartz; install gnuplot --with-x11
setenv('GNUTERM','wxt')   # Requires wxmac; install gnuplot --with-wxmac
setenv('GNUTERM','aqua')  # Requires AquaTerm; install gnuplot --with-aquaterm

You may also set this variable from within Octave. For printing the cairo backend
is recommended, i.e., install gnuplot with --with-cairo, and use

print -dpdfcairo figure.pdf


When using the the qt or fltk toolkits then invisible figures do not work because
osmesa does currently not work with the Mac's OpenGL implementation. The usage of
gnuplot is recommened.

What worked for me was adding the --with-gui:

brew install octave --with-qt --with-fltk --with-gui

Or reinstalling:

brew reinstall octave --with-qt --with-fltk --with-gui
2
  • 1
    Not sure if this is still valid, brew complains: Warning: homebrew/science/octave: this formula has no --with-fltk option so it will be ignored! Warning: homebrew/science/octave: this formula has no --with-gui option so it will be ignored! Warning: homebrew/science/octave: this formula has no --with-qt option so it will be ignored! Jul 21 '17 at 12:06
  • 1
    Note that none of those options exist anymore on the Homebrew formula.
    – bfontaine
    Aug 22 '17 at 9:16
4

I found the answer and I will post it here for anyone else that needs it.

Octave gui requires the qt package (see the answer by bpabbot here). So in order to use the gui, octave should be installed with this command:

brew install octave --with-qt --with-fltk

Or if you have already installed it without qt, you can reinstall it:

brew reinstall octave --with-qt --with-fltk

However, as it currently stands, the formula for version 3.8.0 of octave has an issue and does not install --with-qt. There is a bug reported, and it will be fixed for 3.8.1 version. You can see more details here.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .