[GRASS-dev] return of the OSX xterm question

William Kyngesburye woklist at kyngchaos.com
Mon Apr 9 10:13:25 EDT 2007

On Apr 9, 2007, at 3:56 AM, Glynn Clements wrote:

>>> Can you not just run the command in a separate terminal instance, in
>>> the same way that xterms are used?
>> Not quite.  Problems (rehash from previous discussion):
>> - doesn't inherit env
> So far as this part is concerned, I suggest writing out the
> environment as a shell script, then sending e.g.
> "source /path/to/env.sh" to the terminal, rather than sending
> individual settings.
Interaction with Terminal.app from AppleScript is limited to sending  
commands inline. If I sent the temp script file first from the shell,  
then switched to AppleScript control, there is the problem that I  
might connect to the wrong Terminal window due to the Terminal's  
limited AppleScript capabilities.

>> - returns immediately, without waiting for command to finish
>> - leaves Terminal as active application, so one must manually switch
>> back to whatever called it (ie X11/Tcltk)
> Can you create a new terminal, send it the command, wait for the
> command to complete, then kill the terminal?
> Sending environment settings to an existing terminal might cause
> problems for what you were doing in that terminal.
The AppleScript part does this.  AppleScript is needed to do the  
waiting.  It also waits for the env commands, though just with a  
single delay (I may need to loop that for slow Macs).

> Also, isn't there anything like xterm which uses the native GUI? Or is
> there something about the nature of the GUI which makes that
> impossible?
I saw an alternative recently, and it claims xterm compatibility.   
It's in beta right now.  One small problem is requiring/suggesting  
yet another extra on a user's system.

But mainly, I can't understand how the xterm compatibility part would  
work: to be able to handle the xterm flags, it has to be able to run  
from the CLI, but when run from the CLI an application executable  
opens a completely new instance of the whole application, not a new  
window (exactly the same problem as the browser issue I'm working on).

The open method which is necessary operates on files, and doesn't  
have a way to pass arguments with that.

William Kyngesburye <kyngchaos*at*kyngchaos*dot*com>

"This is a question about the past, is it? ... How can I tell that  
the past isn't a fiction designed to account for the discrepancy  
between my immediate physical sensations and my state of mind?"

- The Ruler of the Universe

More information about the grass-dev mailing list