GRASS variables and environment variables

There are two types of variables:

Setting environment variables


Setting environment variables depends on the shell being used:
       export VARIABLE=value
or
       setenv VARIABLE value

Setting environment variables permanently

Setting GRASS variables

You have to use "g.gisenv" (within GRASS):

Use:     g.gisenv set=VARIABLE=VALUE

It looks unusual with two equals signs, but g.gisenv does dual duty for getting and setting GRASS environment variables. If the user just specifies a variable name, it defaults to "get" mode. Example:

      GRASS ~> g.gisenv GRASS_GUI
      text

To permanently predefine GRASS environment variables the user may specify the variable(s) in the .grassrc57 file.


List of selected (GRASS related) environment variables

GISBASE
  directory where GRASS lives

GISRC
  name of .grassrc5 file

GRASS_ADDON_PATH
[grass5] startup script
  allows to specify additional paths to local GRASS modules extra to standard distribution

GRASS_BACKGROUNDCOLOR
[PNGdriver]
  defines the background color of the image created by the PNG driver

GRASS_GNUPLOT
[m.svfit, s.probplt, s.sv]
  program to use for plotting "gnuplot" data

GRASS_HEIGHT
[d.mon]
  defines the height of GRASS monitor, see also GRASS_WIDTH

GRASS_PAGER
[various modules]
Maybe set to either "less" or "more"

GRASS_PERL
  set perl with path

GRASS_PNGFILE
[PNGdriver]
  name of PNG output file

GRASS_STDERR
  set to any value to prevent user mail on error

GRASS_TCLSH
[nviz]
  set tclsh shell name to override 'tclsh'

GRASS_TRANSPARENT
[PNGdriver]
  if "TRUE", the image created by the PNG driver will have a transparent background

GRASS_TRUECOLOR
[PNGdriver]
  if "TRUE", the PNG driver generates a true-color image

GRASS_WIDTH
[d.mon]
  defines the width of GRASS monitor, see also GRASS_HEIGHT

GRASS_WISH
[tcltkgrass, nviz]
  set wish shell name to override 'wish'

List of selected GRASS variables

GISDBASE
  initial database

GIS_LOCK
  lock ID to prevent parallel GRASS use,
  process id of the start-up shell script

GRASS_GUI
  either "text" or "tcltk" to define non-/graphical startup

LOCATION
 full path to location directory

LOCATION_NAME
 initial location name

MAPSET
  initial mapset

GRASS-related Files

$HOME/.grassrc57
to store GRASS variables (but not environment variables)

$HOME/GIS_ERROR_LOG
  If this file exists, all GRASS error messages are stored here instead of sending a mail to the GIS user. To generate the file, use:
   touch $HOME/GIS_ERROR_LOG

SEE ALSO

g.gisenv

Last changed: $Date: 2004/05/10 12:23:22 $


Help Index