[GRASSLIST:1335] Re: grassrc5 problems

Glynn Clements glynn.clements at virgin.net
Tue Sep 23 04:16:31 EDT 2003


William K wrote:

> >> 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
> >
> > Can you provide more details as to exactly what you mean by "startup
> > doc page"? If it's a file, what is its name?
> >
> Can't seem to get to either Baylor or ITC right now to check, but it's 
> there in the 'grass5' man page:

OK, thanks.

> ENVIRONMENT VARIABLES
>     User Interface Environment Variable
>         The  grass5  program  will  check  for the existence of an
>         environment variable called GRASS_GUI which indicates  the
>         type  of user interface for GRASS to use. If this variable
>         is not set when grass5 is run, then it will be created and
>         then  saved  in the $HOME/.grassrc5 file for the next time
>         GRASS is run.
> 
>         There is an order of precedence in the way  grass5  deter-
>         mines  the  user   interface  to use. The following is the
>         hierarchy from highest precedence to lowest.
> 
>         The  user  may  add   own  environment  variable  settings to
>         $HOME/.grassrc5 file which are used during next startup of
>         GRASS (list of implemented environment variables).

OK, that appears to accurately describe the current behaviour,
although the current behaviour is probably wrong. As it stands, if
GRASS_GUI is set in the environment, the setting in $GISRC is ignored,
which is probably undesirable. E.g. if you use either the -text or
-tcltk switches, the GRASS_GUI setting is updated in $GISRC, so that
choice is remembered for future sessions.

> etc.
> 
> It's basically calling everything 'environment variables'. Confusing.  

Yep. It used to be even worse, (i.e. some programs would consult the
environment while others would consult $GISRC) but most of the actual
code was fixed by the time that 5.0.0 was released. OTOH, the
documentation appears to be a different matter.

The main reason for having GRASS variables distinct from environment
variables is that GRASS variables can be modified by programs, whereas
environment variables can't. This is likely to become even more
important in future, to allow for features such as being able to
switch between locations within a session.

> I guess Markus needs to work on this one next, after he takes care of 
> html/env_vars.html.

The most recent change to env_vars.html made matters worse; it splits
the variables into GRASS variables and environment variables, but the
categorisation is incorrect. It may take some time to get this right.

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




More information about the grass-user mailing list