I run octave in Terminal but whenever I use the Octave command to start octave (from an existing terminal session) or select Octave in Mission Control, it starts a new Terminal window. I find this behaviour annoying.

How can I make octave run in my current Terminal window?

  • 3
    How do you run it? Little more details please. – Rob Apr 23 '14 at 9:27
  • Do you use a .command file? – DonyorM Apr 23 '14 at 9:29
  • @Rob I start it by command "Octave" in terminal (already copied the app into bin folder), or by choosing from Spotlight or Alfred. They all end up in a new terminal window. – sjtufs Apr 23 '14 at 15:42
  • @DonyorM I don't really know what is a .command file? – sjtufs Apr 23 '14 at 15:43
  • A .command file is a shell script that can be double clicked and automatically run. I don't know much about Octave, but I know if I use a .command file it always opens a new wind. What kind of program is octave? – DonyorM Apr 24 '14 at 2:33

The actual script that executes when the new Terminal window is opened can be found at /usr/local/octave/3.8.0/bin/octave-3.8.0. This path will be different for different versions of Octave. To have this script run when you run the octave command, create a symbolic link to something like /usr/local/bin/octave (assuming /usr/local/bin is on your path).

The command to run this would be something along the lines of:

sudo ln -sf /usr/local/octave/3.8.0/bin/octave-3.8.0 /usr/local/bin/octave
|improve this answer|||||

I'll take a shot at answering your question...

It sounds like your current Octave app is more or less a convenient wrapper for the scripts and such that you would otherwise have to run from the terminal to get things up and running. In other words, it's created for people that are trying to avoid interacting with the terminal directly (and since you seem to enjoy working directly from the command line, the app has lost a lot of its convenience).

Anyway, in my opinion (for what it's worth) your best bet is to ditch the Octave app and instead take a more hands-on approach and install Octave via a package manager like Homebrew (here are some instructions you can follow).

However, a quick warning: Installing octave this way is occasionally a real pain-in-the-neck (and same goes for getting Octave to work with GNUplot). Though the links I've provided should be enough to help you get Octave set up the way you want, the installation process itself is not always, well, particularly pleasant (after all, those "convenience wrappers" exist for a reason). Just giving you a heads-up...

Hope this helps!

Another helpful tutorial which is similar to the first link.
And still another (the title of this post is pretty revealing...).

|improve this answer|||||

You must log in to answer this question.

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