help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Octave took over Terminal.app in Mac OS X


From: Thomas Treichl
Subject: Re: Octave took over Terminal.app in Mac OS X
Date: Mon, 07 Jan 2008 00:17:17 +0100
User-agent: Thunderbird 2.0.0.9 (Macintosh/20071031)

Louyclare schrieb:
Hi Thomas,

When I double click the Octave.app icon I get a Terminal window with Octave
running. When I double click the Terminal.app icon I get the exact same
thing, a Terminal window with Octave running.

I looked through the posts that you referred me to on:

http://www.nabble.com/octave-stole-my-Terminal-td12640966.html#a12642832

The originator of that thread seemed to have exactly the same problem that I
am having. By the end of the thread, he still did not have a solution
though. One band-aid offered in a post that seems to help is typing the
following command at the Octave prompt:

system ("exec bash")

This takes me out of Octave and into a bash shell. Exiting this takes me
right back to Octave. So it appears that somehow Octave has somehow become
my default shell in Terminal.app.

Interestingly, the same behavior does not occur with an X11 terminal window.
Launching an xterm takes me straight to a bash shell. From here I can type
the command:

exec '/Applications/Octave.app/Contents/Resources/bin/octave'

then Octave launches. Exiting Octave takes me back to the bash command
prompt.

I did find something that may be the ultimate source of the problem, but I
don't know how it is involved. That is the file:

/Applications/Octave.app/Contents/Resources/script

This appears to be a #!/bin/sh script that in turn executes an applescript
that launches Octave. I don't know how or where this script file is called,
however. There is nothing in my .bashrc or .profile that sources anything
mysterious.

Louyclare

Louyclare,

I was able to reproduce the problem - my Terminal.app now behaves the same like
yours and a similar problem with a solution how to solve it can be found in the
Internet. There is a bug in Terminal.app (seems to be on my 10.4.9 system, too).
A description about what is going on is here:

  http://www.macusenet.com/archive/index-t-36473.html

Ok, sow how I could solve my problem: I double-clicked Terminal.app (which automatically calls our exec '.../octave' script that we have written) and then I called the 'system' command in Octave

  octave-3.0.0:1> system ("exec bash")

on that system command I type

  MyMac:~$ rm ~/Library/Preferences/com.apple.terminal.plist

to restore my Terminal.app's defaults and then I close Terminal.app via the main menu to make sure all windows are closed and no other running script is left in any of the windows. That's it, does it work for you, too?

And after that quest I will never press the 'Apply All' menu entry in the window menubar of Terminal.app anymore ;)

  Thomas


reply via email to

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