[GRASS5] More Mac OS X Tcltkgrass Tweaks

Jeshua Lacock jeshua at openosx.com
Sun Apr 27 06:33:38 EDT 2003


I got the online help now working in the native Mac OS X environment.

In "gui.tcl", I changed:
      set html(netscape) "netscape"
      set html(pre)      "file:"
      set cmd [list exec $html(netscape) -remote 
        (and all instances of $html(netscape) -remote openURL)

      set html(netscape) "/usr/local/bin/launchURL"
      set html(pre)      "file://"
      set cmd [list exec $html(netscape) $url]

launchURL is a very simple Mac OS X (carbon) program that I wrote that 
will open the passed URL to the system's preferred browser (which the 
user may set in their "Internet System Preference"). The preference of 
opening a new window or to use the current window is also a OS X 
preference. I can supply the source code (with a Makefile) and or 
binaries if anyone is interested.

I also wrote a simple program to bring Wish to the foreground. Often 
when the GUI was launched it was not visible as it was often hidden 
behind a XTerm or other window(s), so the program I wrote just brings 
it to the front (both for connivence and to avoid potential confusion). 
I then added a couple lines to execute the program in a couple key 
locations (in gis_set.tcl and in tcltkgrass).

I can supply patches and source code, however, these are Mac OS X 
specific changes. There are actually quite a few Mac OS X changes that 
need to be made to the Tcl/Tk for Grass to function in the native Mac 
OS X environment.

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 

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.


Jeshua Lacock __________________________
Programmer/Owner            Phone:   760.935.4736
http://OpenOSX.com           Fax:        760.935.4845

More information about the grass-dev mailing list