[GRASS5] xwininfo error on Mac OS X

I'm new to GRASS and am having some trouble getting it to run on Mac OS X.

I've installed TclTkAqua-8.4.2, and grass5.0.2 successfully, and can start GRASS okay.

However, when I enter the "tcltkgrass &" command, I get the following output:

----------------------------------
Error in startup script: xwininfo: error: No such window with id 0xec0f08.
     while executing
"exec xwininfo -id [winfo id .w_g] | grep -i Corners"
     invoked from within
"scan [exec xwininfo -id [winfo id .w_g] | grep -i Corners] {%*s %d%d} dx dy"
     (file "/usr/local/grass5/tcltkgrass/main/gui.tcl" line 1887)
     invoked from within
"source $env(TCLTKGRASSBASE)/main/gui.tcl"
     (file "/usr/local/grass5/bin/tcltkgrass" line 21)
----------------------------------

I was previously having other problems, but after solving those by adding the X11 bin directory to my path, and setting the DISPLAY environment variable, that is the error I'm now getting.

Any help would be much appreciated.

Thanks,
Nik.

========================================================
NIK SANDS - Systems Administrator
  IT Services
  University of Tasmania, Australia
  Phone: 61-3-63243732 (BH)

Nik Sands wrote:

I'm new to GRASS and am having some trouble getting it to run on Mac OS
X.

I've installed TclTkAqua-8.4.2, and grass5.0.2 successfully, and can
start GRASS okay.

However, when I enter the "tcltkgrass &" command, I get the following
output:

----------------------------------
Error in startup script: xwininfo: error: No such window with id
0xec0f08.
     while executing
"exec xwininfo -id [winfo id .w_g] | grep -i Corners"

"tcltkgrass" is written for a Unix/X11 version of Tcl/Tk; using it
with other versions of Tcl/Tk will result in errors.

In this particular case, tcltkgrass expects "winfo id ..." to return
the ID of an X window (which it does with a Unix/X11 version of
Tcl/Tk).

--
Glynn Clements <glynn.clements@virgin.net>

Thanks Glynn - It was only after I read your email and killed X11 and ran the "Wish Shell" that I realised it wasn't in fact using X11. It's not always obvious in Mac OS X.

So the obvious follow-up questions are:

1. Why isn't GRASS for Mac OS X using the standard unix X11 Tcl/Tk by default (I've got X11 installed and running other applications on it)?

2. What am I supposed to run instead of "tcltkgrass" on Mac OS X?

Thanks in advance,
Nik.

On Tuesday, May 27, 2003, at 02:32 PM, Glynn Clements wrote:

Nik Sands wrote:

I'm new to GRASS and am having some trouble getting it to run on Mac OS
X.

I've installed TclTkAqua-8.4.2, and grass5.0.2 successfully, and can
start GRASS okay.

However, when I enter the "tcltkgrass &" command, I get the following
output:

----------------------------------
Error in startup script: xwininfo: error: No such window with id
0xec0f08.
     while executing
"exec xwininfo -id [winfo id .w_g] | grep -i Corners"

"tcltkgrass" is written for a Unix/X11 version of Tcl/Tk; using it
with other versions of Tcl/Tk will result in errors.

In this particular case, tcltkgrass expects "winfo id ..." to return
the ID of an X window (which it does with a Unix/X11 version of
Tcl/Tk).

--
Glynn Clements <glynn.clements@virgin.net>

========================================================
NIK SANDS - Systems Administrator
  IT Services
  University of Tasmania, Australia
  Phone: 61-3-63243732 (BH)

Nik Sands wrote:

Thanks Glynn - It was only after I read your email and killed X11 and
ran the "Wish Shell" that I realised it wasn't in fact using X11. It's
not always obvious in Mac OS X.

So the obvious follow-up questions are:

1. Why isn't GRASS for Mac OS X using the standard unix X11 Tcl/Tk by
default (I've got X11 installed and running other applications on it)?

The most likely reason is that the MacOSX "wish" comes before the
Unix/X11 version in the path.

You can use the GRASS_WISH environment variable to force the use of a
specific "wish" program, but only if the different versions have
different names (any leading directories are ignored; only the last
component is used). You could force the case by creating a symlink
(e.g. "xwish") for the X11 version.

--
Glynn Clements <glynn.clements@virgin.net>