[GRASSLIST:1320] grassrc5 problems

I've found two env variables in the grassrc5 file that seem to have problems. One is GRASS_ADDON_PATH - it's ignored. I looked at the Init.sh and I see it there-

PATH=$GISBASE/bin:$GISBASE/scripts:$PATH:$GRASS_ADDON_PATH

but nothing gets added to my path from grassrc5. I have to edit the Init.sh to explicitly add the path I want. Bug? Or did I miss something?

The other is strange - GRASS_WISH. Here's the setup:

- Mac OS X. GRASS 5.0 CVS (5.3)
- Tcl/Tck Aqua - a Mac OS X-only version of Tcl/Tk with it's own Wish application, I don't/can't use this with GRASS. Installed as Mac OS X framework + wish in /usr/bin
- Apple's Tcl/Tk, doesn't include wish. Installed in /usr.
- Tcl/Tk I built for UNIX/X11 - this is the one I want to use. I installed it in /usr/X11R6 to keep it out of the way of the others, and renamed wish to wish8.4, and tclsh to tclsh8.4.

my PATH has both /usr/X11R6/bin and /usr/bin.

So, everything is distinct - /usr/bin/wish for the Aqua Tcl/Tk, and /usr/X11R6/bin/wish8.4 for my X11 Tcl/Tk. In my grassrc5 I have GRASS_WISH set to wish8.4.

Yet, when I first fire up tcltkgrass (grass -tcltk), the initial dialog to choose the database, I get the Tcl/Tk Aqua wish (which works, tho the rest of tcltkgrass doesn't with Aqua). After choosing the database, it then switches over to the X11 Tcl/Tk.

It's like the GRASS_WISH env isn't set soon enough, it uses the default 'wish', which is Aqua. Once the tcltkgrass menu is up in X11 and GRASS is taking commands in the terminal, env shows that GRASS_WISH is set correctly: 'wish8.4'. If I edit the Init.sh and change the default from 'wish' to 'wish8.4', it uses the X11 Tcl/Tk from the start, as desired.

It all still runs fine, it's just a little disconcerting to jump from one to the other. And, of course, there's no problem running tcltkgrass from within grass - the database dialog is not used then, and the env is set correctly by then.

-----
William Kyngesburye <kyngchaos@charter.net>
http://webpages.charter.net/kyngchaos/

"I ache, therefore I am. Or in my case - I am, therefore I ache."

- Marvin
RIP Douglas Adams 1952-2001

-----
William Kyngesburye <williamk@mappingspecialists.com>
Mapping Specialists <http://www.mappingspecialists.com>

Don't Panic

William K wrote:

I've found two env variables in the grassrc5 file that seem to have
problems. One is GRASS_ADDON_PATH - it's ignored. I looked at the
Init.sh and I see it there-

PATH=$GISBASE/bin:$GISBASE/scripts:$PATH:$GRASS_ADDON_PATH

but nothing gets added to my path from grassrc5. I have to edit the
Init.sh to explicitly add the path I want. Bug? Or did I miss
something?

GRASS_ADDON_PATH is an environment variable, not a GRASS variable;
setting it in ~/.grassrc5 won't have any effect. You would have to set
it in your shell's initialisation files (e.g. /etc/profile, ~/.profile
etc; check the manual page for your shell to determine which files are
read).

The other is strange - GRASS_WISH. Here's the setup:

- Mac OS X. GRASS 5.0 CVS (5.3)
- Tcl/Tck Aqua - a Mac OS X-only version of Tcl/Tk with it's own Wish
application, I don't/can't use this with GRASS. Installed as Mac OS X
framework + wish in /usr/bin
- Apple's Tcl/Tk, doesn't include wish. Installed in /usr.
- Tcl/Tk I built for UNIX/X11 - this is the one I want to use. I
installed it in /usr/X11R6 to keep it out of the way of the others, and
renamed wish to wish8.4, and tclsh to tclsh8.4.

my PATH has both /usr/X11R6/bin and /usr/bin.

So, everything is distinct - /usr/bin/wish for the Aqua Tcl/Tk, and
/usr/X11R6/bin/wish8.4 for my X11 Tcl/Tk. In my grassrc5 I have
GRASS_WISH set to wish8.4.

Again, GRASS_WISH is an environment variable, not a GRASS variable.

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

On Sun, Sep 21, 2003 at 03:53:37PM -0500, William K wrote:

I've found two env variables in the grassrc5 file that seem to have
problems. One is GRASS_ADDON_PATH - it's ignored. I looked at the
Init.sh and I see it there-

[...see Glynn's mail]

Some environment variables are explained here:
http://grass.itc.it/gdp/html_grass5/env_vars.html

Cheers

Markus

GRASS_ADDON_PATH is an environment variable, not a GRASS variable;
setting it in ~/.grassrc5 won't have any effect. You would have to set
it in your shell's initialisation files (e.g. /etc/profile, ~/.profile
etc; check the manual page for your shell to determine which files are
read).

...

Again, GRASS_WISH is an environment variable, not a GRASS variable.

Ah, I guess the difference wasn't clear to me. I think part of the problem is the docs - the page on implemented environment variables divides the two, and mentions briefly that env aren't set in grassrc5. But the grass5 startup doc page implies that you can set env variables in grassrc5, and gives an example: GRASS_GUI.

And at least for GRASS_WISH, grassrc5 is used, just too late for the select database dialog. After startup and I have the tcltkgrass menu, GRASS_WISH _is_ set from what I specified in grassrc5.

-----
William Kyngesburye <kyngchaos@charter.net>
http://webpages.charter.net/kyngchaos/

[Trillian] What are you supposed to do WITH a maniacally depressed robot?

[Marvin] You think you have problems? What are you supposed to do if you ARE a maniacally depressed robot? No, don't try and answer, I'm 50,000 times more intelligent than you and even I don't know the answer...

- HitchHiker's Guide to the Galaxy
RIP Douglas Adams 1952-2001