[GRASS5] More Mac OS X Tcltkgrass Tweaks

Glynn Clements glynn.clements at virgin.net
Sun Apr 27 16:51:07 EDT 2003

Jeshua Lacock wrote:

> At this point, I propose that a new configure switch is added for 
> enabling the native Mac OS X version of the Tcl/Tk interface (some 
> folks on Mac OS X may want to use the traditional *nix version of the 
> interface and those using Darwin without the Aqua interface). Then the 
> set of Mac OS X patches could be applied at configure time and the 
> auxiliary Mac OS X support programs could be built. I would be happy to 
> do most of the work and be responsible for it's maintenance. Any 
> thoughts/comments?

I would rather this was determined at run time.

Most of the things that configure is used for are compile-time issues. 
However, Tcl/Tk is interpreted, so there isn't a "compile time".

IOW, tcltkgrass should be doing something like:

	if $use_aqua {
	      set html(netscape) "/usr/local/bin/launchURL"
	} {
	      set html(netscape) "netscape"

Actually, the choice of browser should be more general; it should be
possible to use something other than netscape on other platforms.

> Also, I am trying to eliminate the Mac OS X "console1" bug. and the 
> following line in gui.tcl is the culprit:
>      set name "| $name 2>@ stdout"
> If I try to reproduce the problem in a new wish file, everything works. 
> Since I can't reproduce the problem outside of Grass, it seems to me 
> that something in the Tcl scripts must be breaking stdout (which very 
> well could be a wish bug). It is really odd because the problem only 
> occurs when the GUI is launched from Init.sh and not when tcltkgrass is 
> launched manually from the Grass terminal. Any ideas? I would be 
> willing to pay for some help. I was preparing a post for the MacTcl 
> mail list, but I stopped short of posting it when I was not able to 
> reproduce the error in a blank wish shell.

The fact that it only occurs when tcltkgrass is launched from Init.sh
suggests a Mac issue. Have you tried this with a test case? I.e. 
running a simple Tcl/Tk script which uses "open | ... 2>@ stdout" from
a shell script. Does it matter whether the script is run in the

Glynn Clements <glynn.clements at virgin.net>

More information about the grass-dev mailing list