[GRASS-dev] return of the OSX xterm question
glynn at gclements.plus.com
Mon Apr 9 04:56:31 EDT 2007
William Kyngesburye wrote:
> >> One thing I'm wondering - is there a way to run a command in a shell
> >> script without displaying the command in the shell? Something like
> >> the @ prefix used in makefiles? Since I have to recreate the env
> >> vars in the new Terminal window, a lot of stuff is spewed to the user
> >> before the requested command is actually run.
> > This isn't a shell issue; it's an artifact of remote-controlling an
> > existing terminal through AppleScript.
> Hmm. My OSX app startup does this too. I thought I've seen it
> purely from running a shell script in a Terminal, but I could be
> mistaken. Oh well, just have to put up with a little clutter...
bash only echoes commands if run with the -x flag.
> > 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
> - 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.
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
Glynn Clements <glynn at gclements.plus.com>
More information about the grass-dev