There are two types of variables:
The following is a list of variables used in GRASS. These variables were found by searching all *.c *.h files for the words "setenv" and "getenv" individually. Note that some of them are not yet found in the source code. These are indicated along with the date they were last checked (dd/mm/yy).
The second part lists GRASS related files.
export VARIABLE=value
or
setenv VARIABLE value
Use: g.gisenv set=VARIABLE=VALUE
It looks unusual with two equals signs, but g.gisenv does dual duty for getting and setting GRASS 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 variables the user may specify the variable(s) in the .grassrc5 file.
BAUD -?
CMAP_SIZE -?
CODECENTER -?
CPL_DEBUG -?
DARKEN -?
DATABASE -?
DBMSCAP
[db.connect]
defines DBMI driver
DBPATH -?
DB_DATABASE -?
DB_DRIVER -?
DB_KEYCOL -?
DB_LOCATION -?
DB_PASSWORD -?
DB_USER -?
DEB -?
DEBUG -?
DIGITIZER
[v.digit]
name of currently selected digitizer board
DPG_LOCK -?
DUMP -?
ELEMENT_LIST
pathname of element list file to use instead of $GISBASE/etc/element_list
ENDPANEL -?
FORCE_GRASS3_COLORS
define to force color table output format in 3.0, even if the structure contains 4.0 rules
G11_LIBRARY -?
GDAL_HOME -?
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_ANOTHER_BUTTON
[various modules]
If the environment variable GRASS_ANOTHER_BUTTON exists,
the mouse button setting will be changed for two-button mice.
GRASS_BACKGROUNDCOLOR
[PNGdriver]
defines the background color of the image created by the PNG driver
GRASS_FP_DOUBLE
define GRASS floating point type (DCELL_TYPE, FCELL_TYPE)
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_HTMLFILE -?
GRASS_HTMLMAXPOINTS -?
GRASS_HTMLMINBBOX -?
GRASS_HTMLMINDIST -?
GRASS_HTMLTYPE -?
GRASS_INT_ZLIB
[libgis] If the environment variable GRASS_INT_ZLIB exists, new compressed
rasters will be compressed using zlib instead of RLE compression. Such
rasters will have a "compressed" value of 2 in the cellhd file.
Obviously, decompression is controlled by the raster's "compressed"
value, not the environment variable.
GRASS_ORGANIZATION
[various vector modules which generate new vector maps]
To set the owner of the vector map ("Organization"). Default
is "GRASS Development Team"
GRASS_PAGER
[various modules]
Maybe set to either "less" or "more"
GRASS_PAN_THRESHOLD
[v.digit]
auto-pan moving speed. Auto panning can be set off by setting
GRASS_PAN_THRESHOLD=0
GRASS_PERL
set perl with path
GRASS_PNGFILE
[PNGdriver]
name of PNG output file
GRASS_PNG_COMPRESSION
[PNGdriver]
compression level of PNG files (0 = none, 1 = fastest, 9 = best)
GRASS_SLEEP - not found in source 20/02/01
GRASS_STDERR
set to any value to prevent user mail on error
GRASS_TCLSH
[tcltkgrass, nviz]
set tclsh shell name to override 'tclsh'
GRASS_TEXT_BROWSER - not found in source 20/02/01
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'
HEIGHT -?
HOME
user's home directory
NO_DRAW -?
NPIXELS -?
Nviz_AutoSurfColors
[nviz]
ORACLE_HOME -?
PAINT -?
PAINTER
currently selected paint output device
PAINT_DRIVER -?
PAINT_DRIVER_SHELL -?
PAINT_HEADER -?
PAINT_TRACE -?
PGSQL - not found in source 20/02/01
PG_HOST
[g.select.pg]
name of PostgreSQL host
PG_DBASE
[g.select.pg]
name of selected PostgreSQL database
PREVIEW_BACKGROUND -?
PROJ_LIB -?
PSPAINTER
[ps.select]
naem of ps device to print to
PWAIT -?
QUALITY -?
RASTERFILE -?
SG3D_HEIGHT
[SG3d]
viewport window default height
SG3D_WIDTH
[SG3d]
viewport window default width
SG3D_SITE_CACHE
[SG3d]
Turn on site caching
SPAG_THRESH
[v.spag]
SQLBASE_DRIVER_STDERR -?
TERM
current terminal type
USER
user name
WIDTH -?
WRITE -?
X3D_HEIGHT
[NVIZ]
viewport window default height
X3D_WIDTH
[NVIZ]
viewport window default height
XDRIVER_PRIVATE_CMAP
[d.mon]
if set, use a private colormap
XDRIVER_WINDOW
[d.mon]
if set, should contain an X window ID; XDRIVER will use this window instead of creating its own
XGANIM_SIZE -?
G3D_CACHE_SIZE_ENV_VAR -?
G3D_CACHE_SIZE_MAX_ENV_VAR -?
G3D_COMPRESSION_ENV_VAR_NO -?
G3D_COMPRESSION_ENV_VAR_YES -?
G3D_DEFAULT_WINDOW3D -?
G3D_FATAL_ERROR_ENV_VAR -?
G3D_FILE_DOUBLE_ENV_VAR -?
G3D_FILE_FLOAT_ENV_VAR -?
G3D_PRECISION_ENV_VAR -?
G3D_PRECISION_ENV_VAR_MAX -?
G3D_PRINT_ERROR_ENV_VAR -?
G3D_RLE_ENV_VAR_NO -?
G3D_RLE_ENV_VAR_YES -?
G3D_TILE_DIM_X_ENV_VAR -?
G3D_TILE_DIM_Y_ENV_VAR -?
G3D_TILE_DIM_Z_ENV_VAR -?
GDAL_HOME -?
GISDBASE
initial database
GIS_LOCK
lock ID to prevent parallel GRASS use,
process id of the start-up shell script
GMPEG_SIZE -?
GRAPH -?
GRASS_GUI
either "text" or "tcltk" to define non-/graphical startup
GTUNE_VSUP_RAM -?
GTUNE_VTOC_RAM -?
LOCATION
full path to location directory
LOCATION_NAME
initial location name
MAPLP
[ppm driver]
MAPSET
initial mapset
MONITOR
[d.mon]
name of selected GRASS monitor
NODUMP -?
SHORT -?
snap threshold value
SPRINT_COMMAND -?
SQLBASE_DIR -?
SQLBASE_DRIVER_STDERR -?
SQLBASE_SERVER -?
STARTPANEL -?
_XPG -?
$HOME/.grassrc5
to store GRASS variables (but not environment variables)
$HOME/.tcltkgrass
$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