[GRASS5] Tcl/Tk console1 bug on Mac OS X

Glynn Clements glynn.clements at virgin.net
Thu Nov 14 20:50:42 EST 2002

Jeshua Lacock wrote:

> I am able to reproduce the following with Grass 5.0.0 with Tcl/Tk 8.4.1 
> on Mac OS X 10.2.x:
> Start Grass, select location via GUI
> Start a Monitor
> Display a raster with the GUI (the command line works)
> Then a message states "channel 'console1' wasn't opened for writing".

Just a guess, but this might be related to writing to stderr; I can't
find any explicit references to "console" in the tcltkgrass code.

> If  I just quit the Tcl/Tk Grass interface and select the "stop all X 
> monitors" option, then start the GUI again, it works great until I quit 
> out of Grass (quiting the GUI is fine).
> The error does not happen with the non-Aqua or "UNIX/XFree" version of 
> wish.
> I greped around a bit and could not find anything. Any ideas and/or 
> help would be greatly appreciated.

GRASS is written for Unix/X11 systems. On "hybrid" systems (e.g. 
Cygwin, MacOSX), where you may have both Unix/X11 and "native"
versions of particular packages (primarily Tcl/Tk and OpenGL), you
have to use the Unix/X11 version.

E.g. on Cygwin, there are three distinct "types" of Tcl/Tk:

1. Native Windows,
2. Cygwin,
3. "vanilla" Unix/X11 (i.e. compile the Tcl/Tk source as for a
Unix/X11 system; the resulting version of "wish" uses X, and hence
needs an X server).

Only option 3 works; the other two versions have incompatible
differences. I suspect that the situation is similar on MacOSX.

It shouldn't be particularly hard to get tcltkgrass working natively
on MacOSX. The things which might need changes are the use of the "wm"
command, and use of X-specific utilities (xterm, xwininfo).

A similar situation applies to NVIZ; only more so, as it uses both
Tcl/Tk and OpenGL.

Glynn Clements <glynn.clements at virgin.net>

More information about the grass-dev mailing list