variables.html 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598
  1. <!-- meta page description: GRASS variables and environment variables -->
  2. There are two types of variables:
  3. <ul>
  4. <li><a href="#setting-shell-environment-variables">shell
  5. environment</a> variables,</li>
  6. <li><a href="#setting-grass-gisenv-variables">GRASS gisenv</a>
  7. variables.</li>
  8. </ul>
  9. There are a number of <i>shell</i> environment variable groups:
  10. <ul>
  11. <li><a href="#list-of-selected-grass-environment-variables-for-rendering">variables
  12. for rendering</a></li>
  13. <li><a href="#list-of-selected-internal-grass-environment-variables">variables
  14. for internal use</a></li>
  15. </ul>
  16. <i>Note:</i> Any setting which needs to be modifiable by a GRASS module
  17. (e.g. MONITOR by <em><a href="d.mon.html">d.mon</a></em>) has to be a GRASS
  18. gisenv variable.
  19. <h2>Setting shell environment variables</h2>
  20. Setting shell environment variables depends on the shell being used:
  21. <br><br>
  22. Bash:
  23. <div class="code"><pre>
  24. export VARIABLE=value
  25. </pre></div>
  26. Csh:
  27. <div class="code"><pre>
  28. setenv VARIABLE value
  29. </pre></div>
  30. Cmd.exe (Windows):
  31. <div class="code"><pre>
  32. set VARIABLE=value
  33. </pre></div>
  34. To set up shell environment variables permanently:
  35. <ul>
  36. <li>
  37. To get personal BASH shell definitions (aliases, color listing option, ...)
  38. into GRASS, store them in:<br>
  39. <tt>$HOME/.grass7/bashrc</tt></li>
  40. <li>
  41. To get personal CSH shell definitions (aliases, color listing option, ...)
  42. into GRASS, store them in:<br>
  43. <tt>$HOME/.grass7/cshrc</tt></li>
  44. </ul>
  45. <h2>Setting GRASS gisenv variables</h2>
  46. Use <em><a href="g.gisenv.html">g.gisenv</a></em> within GRASS. This permanently
  47. predefines GRASS variables in the <tt>$HOME/.grass7/rc</tt> file after the
  48. current GRASS session is closed.
  49. <br><br>
  50. Usage:
  51. <div class="code"><pre>
  52. g.gisenv set="VARIABLE=VALUE"
  53. </pre></div>
  54. It looks unusual with two equals signs, but <em>g.gisenv</em> serves dual duty for
  55. getting and setting GRASS variables.
  56. <p>If the user just specifies a variable name, it defaults to <b>get</b> mode.
  57. For example:
  58. <div class="code"><pre>
  59. g.gisenv MAPSET
  60. PERMANENT
  61. </pre></div>
  62. <h2>List of selected (GRASS related) shell environment variables</h2>
  63. <blockquote>
  64. [ To be set from the terminal shell or startup scripts ]
  65. </blockquote>
  66. <dl>
  67. <dt>GISBASE</dt>
  68. <dd>directory where GRASS lives. This is set automatically by the
  69. startup script.</dd>
  70. <dt>GISRC</dt>
  71. <dd>name of <tt>$HOME/.grass7/rc</tt> file. Defines the system wide value
  72. when starting a GRASS session. Within a GRASS session, a temporary copy
  73. of this file will be used.</dd>
  74. <dt>GRASS_ADDON_PATH</dt>
  75. <dd>[grass startup script, g.extension]<br>
  76. specifies additional path(s) containing local and/or custom GRASS
  77. modules extra to the standard distribution.</dd>
  78. <dt>GRASS_ADDON_BASE</dt>
  79. <dd>[grass startup script]<br> allows specifying additional GISBASE
  80. for local GRASS modules (normally installed as GRASS Addons
  81. by <tt>g.extension</tt> module) extra to standard
  82. distribution. The default on GNU/Linux
  83. is <tt>$HOME/.grass7/addons</tt>, on MS
  84. Windows <tt>$APPDATA\GRASS7\addons</tt>.</dd>
  85. <dt>GRASS_ADDON_ETC</dt>
  86. <dd>[libgis, g.findetc]<br>
  87. specify paths where support files (etc/) may be found external to
  88. standard distribution.</dd>
  89. <dt>GRASS_BATCH_JOB</dt>
  90. <dd>defines the name (path) of a shell script to be processed as
  91. batch job.</dd>
  92. <dt>GRASS_COMPRESSOR</dt>
  93. <dd>[libraster]<br>
  94. the compression method for new raster maps can be set with the
  95. environment variable GRASS_COMPRESSOR. Supported methods are RLE,
  96. ZLIB, LZ4, BZIP2, and ZSTD. The default is ZSTD if available,
  97. otherwise ZLIB, which can be changed with e.g.
  98. <tt>GRASS_COMPRESSOR=ZSTD</tt></dd>, granted that GRASS has been
  99. compiled with the requested compressor. Compressors that are always
  100. available are RLE, ZLIB, and LZ4. The compressors BZIP2 and ZSTD
  101. must be enabled when configuring GRASS for compilation.
  102. <dt>GRASS_DB_ENCODING</dt>
  103. <dd>[various modules, wxGUI]<br>
  104. encoding for vector attribute data (utf-8, ascii, iso8859-1, koi8-r)</dd>
  105. <dt>GIS_ERROR_LOG</dt>
  106. <dd>If set, GIS_ERROR_LOG should be the absolute path to the log
  107. file (a relative path will be interpreted relative to the process'
  108. cwd, not the cwd at the point the user set the variable). If not
  109. set, <tt>$HOME/GIS_ERROR_LOG</tt> is used instead. The file will
  110. only be used if it already exists.</dd>
  111. <dt>GRASS_ERROR_MAIL</dt>
  112. <dd>set to any value to send user mail on an error or warning that
  113. happens while stderr is being redirected.</dd>
  114. <dt>GRASS_FONT</dt>
  115. <dd>[display drivers]<br>
  116. specifies the font as either the name of a font from
  117. <tt>$GISBASE/etc/fontcap</tt> (or alternative fontcap file
  118. specified by GRASS_FONT_CAP), or alternatively the full path to a
  119. FreeType font file.</dd>
  120. <dt>GRASS_ENCODING</dt>
  121. <dd>[display drivers]<br>
  122. the encoding to be assumed for text which is drawn using a
  123. freetype font; may be any encoding know to <em>iconv</em>.</dd>
  124. <dt>GRASS_FONT_CAP</dt>
  125. <dd>[g.mkfontcap, d.font, display drivers]<br>
  126. specifies an alternative location (to <tt>$GISBASE/etc/fontcap</tt>) for
  127. the font configuration file.</dd>
  128. <dt>GRASS_FULL_OPTION_NAMES</dt>
  129. <dd>[parser]<br>
  130. Generates a warning if GRASS_FULL_OPTION_NAMES is set (to anything) and
  131. a found string is not an exact match for the given string.</dd>
  132. <dt>GRASS_GUI</dt>
  133. <dd>either <tt>text</tt> (text user interface), <tt>gtext</tt> (text
  134. user interface with GUI welcome screen), or <tt>gui</tt> (graphical
  135. user interface) to define non-/graphical startup. Can also specify
  136. the name of the GUI to use, e.g. <tt>wxpython</tt>
  137. (<em><a href="wxGUI.html">wxGUI</a></em>). Also exists as a GRASS
  138. gisenv variable (see below). If this shell variable exists at GRASS
  139. startup, it will determine the GUI used. If it is not defined
  140. startup will default to the last GUI used.</dd>
  141. <dt>GRASS_HTML_BROWSER</dt>
  142. <dd>[init.sh, wxgui]<br> defines name of HTML browser. For most
  143. platforms this should be an executable in your PATH, or the full
  144. path to an executable.<br> Mac OS X runs applications differently
  145. from the CLI. Therefore, GRASS_HTML_BROWSER should be the
  146. application's signature, which is a domain-like name, just
  147. reversed, i.e. com.apple.Safari. To find an application's
  148. signature, type the following in a Terminal (fill in the path to
  149. the application you are interested in, for example:
  150. /Applications/Safari.app):<br> &nbsp; &nbsp; <code>grep -A 1
  151. &quot;CFBundleIdentifier&quot;</code> <i>/path/to/application.app</i><code>/Contents/Info.plist</code><br>
  152. &nbsp; The signature is the &lt;string&gt; following the
  153. &lt;key&gt;, without the bracketing &lt;string&gt; tags.</dd>
  154. <dt>GRASS_INT_ZLIB</dt>
  155. <dd>[libraster]<br> if the environment variable GRASS_INT_ZLIB exists and has the value 0,
  156. new compressed <i>integer</i> (CELL type) raster maps will be compressed
  157. using RLE compression.
  158. <br><br>
  159. If the variable doesn't exist, or the value is non-zero, zlib compression
  160. will be used instead. Such rasters will have a <tt>compressed</tt>
  161. value of 2 in the cellhd file.
  162. <br><br>
  163. Obviously, decompression is controlled by the
  164. raster's <tt>compressed</tt> value, not the environment variable.</dd>
  165. <dt>GRASS_ZLIB_LEVEL</dt>
  166. <dd>[libgis]<br> if the environment variable GRASS_ZLIB_LEVEL exists and its value can
  167. be parsed as an integer, it determines the compression level used when new compressed
  168. raster maps are compressed using zlib compression. This applies to all
  169. raster map types (CELL, FCELL, DCELL).
  170. <br><br>
  171. Valid zlib compression levels are -1 to 9. The <tt>GRASS_ZLIB_LEVEL=-1</tt> corresponds
  172. to the zlib default value (equivalent to <tt>GRASS_ZLIB_LEVEL=6</tt>). Often
  173. <tt>GRASS_ZLIB_LEVEL=1</tt> gives the best compromise between speed and compression.
  174. <br><br>
  175. If the variable doesn't exist, or the value cannot be parsed as an
  176. integer, zlib's default compression level 6 will be used.</dd>
  177. <dt>GRASS_MESSAGE_FORMAT</dt>
  178. <dd>[various modules, wxGUI]<br>
  179. it may be set to either
  180. <ul>
  181. <li><tt>standard</tt> - sets percentage output and message
  182. formatting style to standard formatting,</li>
  183. <li><tt>gui</tt> - sets percentage output and message formatting
  184. style to GUI formatting,</li>
  185. <li><tt>silent</tt> - disables percentage output and error
  186. messages,</li>
  187. <li><tt>plain</tt> - sets percentage output and message
  188. formatting style to ASCII output without rewinding control
  189. characters.</li>
  190. </ul></dd>
  191. <dt>GRASS_MOUSE_BUTTON</dt>
  192. <dd>[various modules]<br> swaps mouse buttons for two-button or
  193. left-handed mice. Its value has three digits 1, 2, and 3, which
  194. represent default left, middle, and right buttons
  195. respectively. Setting to <tt>132</tt> will swap middle and right
  196. buttons. Note that this variable should be set before a display
  197. driver is initialized (e.g.,
  198. <tt>d.mon x0</tt>).</dd>
  199. <dt>GRASS_PAGER</dt>
  200. <dd>[various modules]<br>
  201. it may be set to either <tt>less</tt>, <tt>more</tt>, or <tt>cat</tt>.</dd>
  202. <dt>GRASS_PERL</dt>
  203. <dd>[used during install process for generating man pages]<br>
  204. set Perl with path.</dd>
  205. <dt>GRASS_PROXY</dt>
  206. <dd>[used during addon install/reinstall process for generating man
  207. pages (download commit from GitHub API server and remote modules.xml file)]<br>
  208. set the proxy with: <tt>GRASS_PROXY="http=&lt;value&gt;,ftp=&lt;value&gt;"</tt>.</dd>
  209. <dt>GRASS_SKIP_MAPSET_OWNER_CHECK</dt>
  210. <dd>By default it is not possible to work with MAPSETs that are
  211. not owned by current user. Setting this variable to any non-empty value
  212. allows the check to be skipped.</dd>
  213. <dt>GRASS_SH</dt>
  214. <dd>[shell scripts on Windows]<br>
  215. path to bourne shell interpreter used to run shell scripts.</dd>
  216. <dt>GRASS_SIGSEGV_ON_ERROR</dt>
  217. <dd>Raise SIGSEGV if an error occurs]<br>
  218. This variable can be set for debugging purpose. The call
  219. of G_fatal_error() will end in a segmentation violation. GDB can be used
  220. to trace the source of the error.</dd>
  221. <dt>GRASS_PYTHON</dt>
  222. <dd>[wxGUI, Python Ctypes]<br>
  223. set to override Python executable.<br>
  224. On Mac OS X this should be the <tt>pythonw</tt> executable for the
  225. wxGUI to work.</dd>
  226. <dt>GRASS_VECTOR_LOWMEM</dt>
  227. <dd>[vectorlib]<br>
  228. If the environment variable GRASS_VECTOR_LOWMEM exists, memory
  229. consumption will be reduced when building vector topology
  230. support structures. Recommended for creating large vectors.</dd>
  231. <dt>GRASS_VECTOR_OGR</dt>
  232. <dd>[vectorlib, v.external.out]<br> If the environment variable
  233. GRASS_VECTOR_OGR exists and vector output format defined
  234. by <em><a href="v.external.out.html">v.external.out</a></em> is
  235. PostgreSQL, vector data is written by OGR data provider even
  236. the native PostGIS data provider is available.</dd>
  237. <dt>GRASS_VECTOR_EXTERNAL_IMMEDIATE</dt>
  238. <dd>[vectorlib, v.external.out]<br> If the environment variable
  239. GRASS_VECTOR_EXTERNAL_IMMEDIATE exists and vector output format
  240. defined
  241. by <em><a href="v.external.out.html">v.external.out</a></em> is
  242. non-native, vector features are written to output external
  243. datasource immediately. By default, the vector library writes
  244. output data to a temporary vector map in native format and when
  245. closing the map, the features are transferred to output external
  246. datasource. Note: if output vector format is topological PostGIS
  247. format, then the vector library writes features immediately to output
  248. database (in this case GRASS_VECTOR_EXTERNAL_IMMEDIATE is ignored).</dd>
  249. <dt>GRASS_VECTOR_EXTERNAL_IGNORE</dt>
  250. <dd>[vectorlib]<br> If the environment variable
  251. GRASS_VECTOR_EXTERNAL_IGNORE exists, output vector format defined
  252. by <em><a href="v.external.out.html">v.external.out</a></em> is
  253. ignored. The format is always native.</dd>
  254. <dt>GRASS_VECTOR_TEMPORARY</dt>
  255. <dd>[vectorlib]<br> If the environment variable
  256. GRASS_VECTOR_TEMPORARY exists, GRASS vector library will operate
  257. on temporary vector maps. New vector maps will be created in
  258. temporary directory (see GRASS_VECTOR_TMPDIR_MAPSET variable), existing
  259. vector maps will be read (if found) also from this directory. It
  260. may be set to either:
  261. <ul>
  262. <li><tt>keep</tt> - the temporary vector map is not deleted when
  263. closing the map.
  264. <li><tt>move</tt> - the temporary vector map is moved to the
  265. current mapset when closing the map.</li>
  266. <li><tt>delete</tt> - the temporary vector map is deleted when
  267. closing the map.
  268. </li>
  269. </ul>
  270. Default value is <tt>keep</tt>.
  271. Note that temporary vector maps are not visible to the user
  272. via <em><a href="g.list.html">g.list</a></em>
  273. or <em><a href="wxGUI.html">wxGUI</a></em>. They are used
  274. internally by the GRASS modules and deleted automatically when
  275. GRASS session is quited.</dd>
  276. <dt>GRASS_VECTOR_TMPDIR_MAPSET</dt>
  277. <dd>[vectorlib]<br> By default GRASS temporary directory is located in
  278. <tt>$LOCATION/$MAPSET/.tmp/$HOSTNAME</tt>. If GRASS_VECTOR_TMPDIR_MAPSET is
  279. set to '0', the temporary directory is located in TMPDIR
  280. (environmental variable defined by the user or GRASS initialization
  281. script if not given).<br>
  282. Important note: This variable is currently used only in vector
  283. library. In other words the variable is ignored by raster or
  284. raster3d library.</dd>
  285. <dt>GRASS_VECTOR_TOPO_DEBUG</dt>
  286. <dd>[vectorlib, v.generalize]<br> If the environment variable
  287. GRASS_VECTOR_TOPO_DEBUG
  288. exists, <em><a href="v.generalize.html">v.generalize</a></em> runs
  289. in extremely slow debug mode.</dd>
  290. <dt>GRASS_WXBUNDLED</dt>
  291. <dd>[wxGUI]<br>
  292. set to tell wxGUI that a bundled wxPython will be used.<br>
  293. When set, the wxGUI will not check the wxPython version, as this
  294. function is incompatible with a bundled wxPython. It is up to the
  295. packager to make sure that a compatible wxPython version is bundled.</dd>
  296. <dt>GRASS_WXVERSION</dt>
  297. <dd>[wxGUI]<br>
  298. set to tell wxGUI which version of wxPython to use.<br>
  299. When set, the wxGUI will select the given wxPython version. It's
  300. useful when multiple versions of wxPython are installed and the
  301. user wants to run wxGUI with non-default wxPython version.</dd>
  302. <dt>GRASS_XTERM</dt>
  303. <dd>[lib/init/grass-xterm-wrapper, lib/init/grass-xterm-mac]<br>
  304. set to any value (e.g. rxvt, aterm, gnome-terminal, konsole) to
  305. substitute 'x-terminal-emulator' or 'xterm'. The Mac OS X app
  306. startup defaults to an internal '$GISBASE/etc/grass-xterm-mac',
  307. which emulates the necessary xterm functionality in
  308. Terminal.app.</dd>
  309. <dt>GRASS_UI_TERM</dt>
  310. <dd>set to any value to use the terminal based parser.</dd>
  311. <dt>GRASS_VERSION</dt>
  312. <dd>reports the current version number (used by R-stats interface etc);
  313. should not be changed by user.</dd>
  314. <dt>GRASS_NO_GLX_PBUFFERS</dt>
  315. <dd>[nviz]<br>
  316. set to any value to disable the use of GLX Pbuffers.</dd>
  317. <dt>GRASS_NO_GLX_PIXMAPS</dt>
  318. <dd>[nviz]<br>
  319. Set to any value to disable the use of GLX Pixmaps.</dd>
  320. <dt>OMP_NUM_THREADS</dt>
  321. <dd>[OpenMP]<br>
  322. If OpenMP support is enabled this limits the number of threads.
  323. The default is set to the number of CPUs on the system.
  324. Setting to '1' effectively disables parallel processing.</dd>
  325. <dt>TMPDIR, TEMP, TMP</dt>
  326. <dd>[Various GRASS GIS commands and wxGUI]<br>
  327. <!-- what about Windows %TEMP% and http://trac.osgeo.org/grass/ticket/560#comment:21 ? -->
  328. The default wxGUI temporary directory is chosen from a
  329. platform-dependent list, but the user can control the selection of
  330. this directory by setting one of the TMPDIR, TEMP or TMP
  331. environment variables Hence the wxGUI uses $TMPDIR if it is set,
  332. then $TEMP, otherwise /tmp.</dd>
  333. </dl>
  334. <h3>List of selected GRASS environment variables for rendering</h3>
  335. <blockquote>
  336. [ In addition to those which are understood by
  337. specific <em><a href="displaydrivers.html">GRASS display
  338. drivers</a></em>, the following variables affect rendering. ]
  339. </blockquote>
  340. <dl>
  341. <dt>GRASS_RENDER_IMMEDIATE</dt>
  342. <dd>tells the display library which driver to use; possible
  343. values: <em><a href="cairodriver.html">cairo</a></em>, <em><a href="pngdriver.html">png</a></em>, <em><a href="psdriver.html">ps</a></em>,
  344. <em><a href="htmldriver.html">html</a></em>
  345. or <em>default</em>.<br>Default display driver
  346. is <em><a href="cairodriver.html">cairo</a></em> (if available)
  347. otherwise <em><a href="pngdriver.html">png</a></em>.
  348. </dd>
  349. <dt>GRASS_RENDER_WIDTH</dt>
  350. <dd>defines the width of output image (default is 640).</dd>
  351. <dt>GRASS_RENDER_HEIGHT</dt>
  352. <dd>defines the height of output image (default is 480).</dd>
  353. <dt>GRASS_RENDER_FILE</dt>
  354. <dd>the name of the resulting image file.</dd>
  355. <dt>GRASS_RENDER_FRAME</dt>
  356. <dd>contains 4 coordinates, <em>top,bottom,left,right</em> (pixel
  357. values) with respect to the top left corner of the output image,
  358. defining the initial frame.</dd>
  359. <dt>GRASS_RENDER_LINE_WIDTH</dt>
  360. <dd>defines default line width.</dd>
  361. <dt>GRASS_RENDER_TEXT_SIZE</dt>
  362. <dd>defines default text size.</dd>
  363. <dt>GRASS_RENDER_COMMAND</dt>
  364. <dd>external command called by display library to render data (see
  365. example in <em><a href="displaydrivers.html">display
  366. drivers</a></em> page for details).<br>Currently only Python scripts
  367. are supported.</dd>
  368. </dl>
  369. For specific driver-related variables see:
  370. <ul>
  371. <li><em><a href="cairodriver.html">Cairo display driver</a></em></li>
  372. <li><em><a href="pngdriver.html">PNG display driver</a></em></li>
  373. <li><em><a href="psdriver.html">PS (Postscript) display driver</a></em></li>
  374. <li><em><a href="htmldriver.html">HTML display driver</a></em></li>
  375. </ul>
  376. <h3>List of selected internal GRASS environment variables</h3>
  377. <blockquote>
  378. [ These variables are intended <b>for internal use only</b> by the GRASS
  379. software to facilitate communication between the GIS engine, GRASS scripts,
  380. and the GUI.
  381. The user should not set these in a GRASS session. They are meant to be set
  382. locally for specific commands. ]
  383. </blockquote>
  384. <dl>
  385. <dt>GRASS_OVERWRITE</dt>
  386. <dd>[all modules]<br>
  387. toggles map overwrite.
  388. <ul>
  389. <li>0 - maps are protected (default),</li>
  390. <li>1 - maps with identical names will be overwritten.</li>
  391. </ul>
  392. This variable is automatically created
  393. by <em><a href="g.parser.html">g.parser</a></em> so that the
  394. <tt>--overwrite</tt> option will
  395. be inherited by dependent modules as the script runs. Setting either the
  396. GRASS_OVERWRITE environment variable or the OVERWRITE gisenv variable detailed
  397. below will cause maps with identical names to be overwritten.</dd>
  398. <dt>GRASS_VERBOSE</dt>
  399. <dd>[all modules]<br>
  400. toggles verbosity level
  401. <ul>
  402. <li>-1 - complete silence (also errors and warnings are discarded)</li>
  403. <li>0 - only errors and warnings are printed</li>
  404. <li>1 - progress and important messages are printed (percent complete)</li>
  405. <li>2 - all module messages are printed</li>
  406. <li>3 - additional verbose messages are printed</li>
  407. </ul>
  408. This variable is automatically created by <em><a href="g.parser.html">g.parser</a></em>
  409. so that the <tt>--verbose</tt> or <tt>--quiet</tt> flags will be inherited
  410. by dependent modules as the script runs.</dd>
  411. <dt>GRASS_REGION</dt>
  412. <dd>[libgis]<br>
  413. override region settings, separate parameters with a ";". Format
  414. is the same as in the WIND region settings file. Otherwise use is the same as
  415. WIND_OVERRIDE.</dd>
  416. <dt>WIND_OVERRIDE</dt>
  417. <dd>[libgis]<br>
  418. it causes programs to use the specified named region (created with
  419. e.g. <tt>g.region save=...</tt>) to be used as the current region, instead of
  420. the region from the WIND file.<br><br>
  421. This allows programs such as the GUI to run external commands on an
  422. alternate region without having to modify the WIND file then change it
  423. back afterwards.</dd>
  424. </dl>
  425. <h2>List of selected GRASS gisenv variables</h2>
  426. <blockquote>
  427. [ Use <em><a href="g.gisenv.html">g.gisenv</a></em> to get/set/unset/change them ]
  428. </blockquote>
  429. <dl>
  430. <dt>DEBUG</dt>
  431. <dd>[entire GRASS]<br>
  432. sets level of debug message output (0: no debug messages)
  433. <div class="code"><pre>
  434. g.gisenv set=DEBUG=0
  435. </pre></div>
  436. <dt>WX_DEBUG</dt>
  437. <dd>[wxGUI]<br>
  438. sets level of debug message output for <em><a href="wxGUI.html">wxGUI</a></em> (0: no debug messages, 1-5 debug levels)
  439. <dt>GISDBASE</dt>
  440. <dd>initial database</dd>
  441. <dt>GIS_LOCK</dt>
  442. <dd>lock ID to prevent parallel GRASS use,
  443. <br>process id of the start-up shell script</dd>
  444. <dt>GUI</dt>
  445. <dd>See <tt>GRASS_GUI</tt> environmental variable for details.</dd>
  446. <dt>LOCATION</dt>
  447. <dd>full path to location directory</dd>
  448. <dt>LOCATION_NAME</dt>
  449. <dd>initial location name</dd>
  450. <dt>MAPSET</dt>
  451. <dd>initial mapset</dd>
  452. <dt>MEMORYMB</dt>
  453. <dd>[entire GRASS with focus on raster related data processing]<br>
  454. sets the maximum memory to be used (in MB), i.e. the cache size for raster rows
  455. <div class="code"><pre>
  456. # set to 6 GB (default: 300 MB)
  457. g.gisenv set="MEMORYMB=6000"
  458. </pre></div>
  459. <dt>OVERWRITE</dt>
  460. <dd>[all modules]<br>
  461. toggles map overwrite.
  462. <ul>
  463. <li>0 - maps are protected (default),</li>
  464. <li>1 - maps with identical names will be overwritten.</li>
  465. </ul>
  466. This variable is automatically created
  467. by <em><a href="g.parser.html">g.parser</a></em> so that the
  468. <tt>--overwrite</tt> option will
  469. be inherited by dependent modules as the script runs. Setting either the
  470. GRASS_OVERWRITE environment variable or the OVERWRITE gisenv variable detailed
  471. below will cause maps with identical names to be overwritten.</dd>
  472. </dl>
  473. <h2>GRASS-related Files</h2>
  474. <dl>
  475. <dt><tt>$HOME/.grass7/rc</tt></dt>
  476. <dd>stores the GRASS gisenv variables (not shell environment variables)</dd>
  477. <dt><tt>$HOME/.grass7/bashrc</tt></dt>
  478. <dd>stores the shell environment variables (Bash only)</dd>
  479. <dt><tt>$HOME/.grass7/env.bat</tt></dt>
  480. <dd>stores the shell environment variables (MS Windows only)</dd>
  481. <dt><tt>$HOME/.grass7/login</tt></dt>
  482. <dd>stores the DBMI passwords in this hidden file.
  483. Only the file owner can access this file.</dd>
  484. <dt><tt>$HOME/GIS_ERROR_LOG</tt></dt>
  485. <dd>if this file exists then all GRASS error and warning messages are
  486. logged here. Applies to current user. To generate the file, use:
  487. <tt>touch $HOME/GIS_ERROR_LOG</tt><br>
  488. See also GIS_ERROR_LOG variable.</dd>
  489. </dl>
  490. Note: On MS Windows the files are stored in <tt>%APPDATA%</tt>.
  491. <h2>SEE ALSO</h2>
  492. <em>
  493. <a href="g.gisenv.html">g.gisenv</a>,
  494. <a href="g.parser.html">g.parser</a>
  495. </em>
  496. <!--
  497. <p>
  498. <i>Last changed: $Date$</i>
  499. -->