OnWorks favicon

g.gisenvgrass - Online in the Cloud

Run g.gisenvgrass in OnWorks free hosting provider over Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator

This is the command g.gisenvgrass that can be run in the OnWorks free hosting provider using one of our multiple free online workstations such as Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator



g.gisenv - Outputs and modifies the user’s current GRASS variable settings.
Prints all defined GRASS variables if no option is given.


general, settings, variables, scripts


g.gisenv --help
g.gisenv [-sn] [get=variable[,variable,...]] [set="variable=value"]
[unset=variable[,variable,...]] [store=string] [separator=character] [--help]
[--verbose] [--quiet] [--ui]

Use shell syntax (for "eval")

Do not use shell syntax

Print usage summary

Verbose module output

Quiet module output

Force launching GUI dialog

GRASS variable to get

GRASS variable to set

GRASS variable to unset

Where GRASS variable is stored
Options: gisrc, mapset
Default: gisrc

Separator for multiple GRASS variables
Special characters: pipe, comma, space, tab, newline
Default: newline


When a user runs GRASS, certain variables are set specifying the GRASS data base,
location, mapset, peripheral device drivers, etc., being used in the current GRASS
session. These variable name settings are recognized as long as the user is running a
GRASS session.


No prompts are given to the user when running g.gisenv.

If run without arguments, g.gisenv lists all of the user’s current GRASS variable
settings. Results are sent to standard output, and may look like this:

If the user specifies a get=variable_name on the command line
g.gisenv MAPSET
only the value for that particular GRASS variable is output to standard output. Possible
variable names depend on the user’s system, see variables list for details. Note that the
variable names are case-insensitive.

While other variables may be associated with each GRASS session (e.g., GRASS_GUI,
GIS_LOCK, and other variables), those stated below are essential.

The GISDBASE is a directory in which all users’ GRASS data are stored. Within the
GISDBASE, data are segregated into subdirectories (called "locations") based on the
map coordinate system used and the geographic extent of the data. Each "location"
directory itself contains subdirectories called "mapsets"; each "mapset" stores "data
base elements" - the directories (e.g., the cell, cellhd, vector, etc., directories)
in which GRASS data files are actually stored.

The user must choose to work with the data under a single GRASS location within any
given GRASS session; this location is then called the current GRASS location, and is
specified by the variable LOCATION_NAME. The LOCATION_NAME is the GRASS data base
location whose data will be affected by any GRASS commands issued during the user’s
current GRASS session, and is a subdirectory of the current GISDBASE. Each "location"
directory can contain multiple "mapset" directories (including the special mapset
PERMANENT). Maps stored under the same GRASS LOCATION_NAME (and/or within the same
MAPSET) must use the same coordinate system and typically fall within the boundaries
of the same geographic region (aka, "location").

Each "mapset" contains a set of maps relevant to the LOCATION_NAME directory in which
it appears. Each LOCATION_NAME can contain multiple mapsets. (Mapsets which fall
under the same LOCATION_NAME all contain data geographically relevant to the
LOCATION_NAME, and all store data in the same map coordinate system. Frequently, maps
are placed into different mapsets to distinguish file ownership - e.g., each user
might have his own mapset, storing any maps that he has created and/or are relevant to
his work.) During each GRASS session, the user must choose one mapset to be the
current mapset; the current mapset setting is given by MAPSET, and is a subdirectory
of LOCATION_NAME. During a single GRASS session, the user can use available data in
any of the mapsets stored under the current LOCATION_NAME directory that are in the
user’s mapset search path and accessible by the user. However, within a single GRASS
session, the user only has write access to data stored under the current mapset
(specified by the variable MAPSET).

Each "mapset" stores GRASS data base elements (i.e., the directories in which GRASS data
files are stored). Any maps created or modified by the user in the current GRASS session
will be stored here. The MAPSET directory PERMANENT is generally reserved for the set of
maps that form the base set for all users working under each LOCATION_NAME.

Once within a GRASS session, GRASS users have access only to the data under a single GRASS
data base directory (the current GRASS data base, specified by the variable GISDBASE), and
to a single GRASS location directory (the current location, specified by the variable
LOCATION_NAME). Within a single session, the user may only modify the data in the current
mapset (specified by the variable MAPSET), but may use data available under other mapsets
under the same LOCATION_NAME.

All of these names must be legal names on the user’s current system.

The full path to the current mapset is determined from GISDBASE, LOCATION_NAME, MAPSET
variables, in the example above: /opt/grassdata/spearfish/PERMANENT. The full path can be
printed using g.gisenv by providing multiple variables:


The output from g.gisenv when invoked without arguments is directly usable by Bash. The
following command will cast each variable into the UNIX environment:
eval `g.gisenv`
This works only for Bash. The format of the output is not compatible with other UNIX

By default the GRASS variables are stored in gisrc file (defined by environmental variable
GISRC). If store=mapset is given than the variables are stored in

GRASS Debugging
To print debugging messages, the variable DEBUG must be set to level equal or greater than
g.gisenv set="DEBUG=3"
Levels: (recommended levels)

· 0 - silence

· 1 - message is printed once or few times per module

· 3 - each row (raster) or line (vector)

· 5 - each cell (raster) or point (vector)
To disable debugging messages:
g.gisenv unset="DEBUG"
The variable DEBUG controls debugging messages from GRASS libraries and modules.

Similarly WX_DEBUG controls debugging messages from wxGUI.

Use g.gisenvgrass online using onworks.net services

Free Servers & Workstations

Download Windows & Linux apps

  • 1
    A set of Python extension modules that
    wrap the cross-platform GUI classes from
    wxWidgets.. Audience: Developers. User
    interface: X Window System (X11), Win32 ...
    Download wxPython
  • 2
    This is the Total War pack file manager
    project, starting from version 1.7. A
    short introduction into Warscape
    modding: ...
    Download packfilemanager
  • 3
    A network traffic tool for measuring
    TCP and UDP performance with metrics
    around both throughput and latency. The
    goals include maintaining an active
    iperf cod...
    Download IPerf2
  • 4
    fre:ac - free audio converter
    fre:ac - free audio converter
    fre:ac is a free audio converter and CD
    ripper for various formats and encoders.
    It features MP3, MP4/M4A, WMA, Ogg
    Vorbis, FLAC, AAC, and Bonk format
    support, ...
    Download fre:ac - free audio converter
  • 5
    Write your chatbot logic once and
    connect it to one of the available
    messaging services, including Amazon
    Alexa, Facebook Messenger, Slack,
    Telegram or even yo...
    Download BotMan
  • 6
    gerbv  a Gerber (RS-274X) viewer
    gerbv a Gerber (RS-274X) viewer
    Gerbv is an open source Gerber file
    (RS-274X only) viewer. Gerbv lets you
    load several files on top of each other,
    do measurements on the displayed image,
    etc. ...
    Download gerbv a Gerber (RS-274X) viewer
  • 7
    I/O performance Analysis Tool.
    Audience: Developers, Information
    Technology, Science/Research, System
    Administrators. User interface: Win32
    (MS Windows). Progr...
    Download Iometer
  • More »

Linux commands