.TH grass6 1 "" "GRASS 6.4.4" "Grass User's Manual" .SH NAME \fI\fBgrass64\fR\fR - The GRASS startup program .br .SH SYNOPSIS \fBgrass64\fR [\fB-\fR] [\fB-v\fR] [\fB-h | -help | --help\fR] [\fB-text | -gui | -tcltk | -oldtcltk | -wxpython | -wx]\fR] [[[\fBGISDBASE/\fR]\fBLOCATION_NAME/\fR] \fBMAPSET\fR] .br .SH DESCRIPTION .PP This command is used to launch GRASS GIS. It will parse the command line arguments and then initialize GRASS for the user. Since GRASS programs require a specific environment, this program must be called before any other GRASS program can run. The command line arguments are optional and provide the user with a method to indicate the desired user interface, as well as the desired mapset to work on. .SH FEATURES .PP The \fIgrass64\fR startup program will remember both the desired user interface and mapset. Thus, the next time the user runs GRASS, typing \fIgrass64\fR (without any options) will start GRASS with the previous settings for the user interface and mapset selected. .PP If you specify a graphical user interface (Tcl/Tk or wxPython) the \fIgrass64\fR program will try to verify that the system you specified exists and that you can access it successfully. If any of these checks fail then \fIgrass64\fR will automatically switch back to the text user interface mode. .SH OPTIONS .PP All command line options are optional. .SS Flags: .IP "\fB-\fR .br Tries to start GRASS using location environment variables (see below) .IP "\fB-h -help --help\fR .br Prints a brief usage message .IP "\fB-text\fR .br Indicates that the text based user interface should be used .IP "\fB-gui\fR (or \fB-tcltk\fR) .br Indicates that the old Tcl/Tk based graphical user interface should be used .IP "\fB-oldtcltk\fR .br Indicates that the even older Tcl/Tk based graphical user interface should be used .IP "\fB-wxpython\fR (or \fB-wx\fR) .br Indicates that the new Python based graphical user interface should be used .IP "\fB-v --version\fR .br Prints the version of GRASS and exits .PP .SS Parameters: .IP "\fBGISDBASE\fR .br Initial database directory which should be a fully qualified path (e.g., /usr/local/share/grassdata) .IP "\fBLOCATION_NAME\fR .br Initial location directory which is a subdirectory of GISDBASE .IP "\fBMAPSET\fR .br Initial mapset directory which is a subdirectory of LOCATION_NAME .PP .br \fB\fINote\fR\fR- These parameters must be specified in one of the following ways: .VL 4m .br MAPSET .br LOCATION_NAME/MAPSET .br GISDBASE/LOCATION_NAME/MAPSET .br .PP .SH ENVIRONMENT VARIABLES A number of environment variables are available at GRASS startup to assist with automation and customization. Most users will not need to bother with these. .PP In addition to these shell environment variables GRASS maintains a number of GIS environment variables in the $HOME/.grassrc6 file. User changes to this file will be read during the next startup of GRASS. If this file becomes corrupted the user may edit it by hand or remove it to start afresh. See the list of implemented GRASS variables for more information. The rest of this help page will only consider shell environment variables. .SS User Interface Environment Variable .PP The \fIgrass64\fR 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 \fIgrass64\fR is run, then it will be created and then saved in the $HOME/.grassrc6 file for the next time GRASS is run. In addition to "text", "tcltk" or "wxpython", the GRASS_GUI variable can be set to the name of the Tcl/Tk GUI to use, for example "gis.m" or "d.m". .PP There is an order of precedence in the way \fIgrass64\fR determines the user interface to use. The following is the hierarchy from highest precedence to lowest. .IP "\fBInterface precedence\fR .br • Command line argument .br • Environment variable GRASS_GUI .br • Value set in $HOME/.grassrc6 .br • Default value - currently gis.m .PP .SS Tcl/Tk and Python Environment Variables .PP If you choose to use the Tcl/Tk graphical user interface, then the following environment variables can be used to override your system default tclsh and wish commands. .IP "\fBGRASS_TCLSH\fR .br Command to use to override tclsh .IP "\fBGRASS_WISH\fR .br Command to use to override wish .IP "\fBGRASS_PYTHON\fR .br Command to use to override python .PP .SS Example Use of GRASS Tcl/Tk Environment Variables .PP Suppose your system has Tcl/Tk 8.3 installed and you install a personal version of the Tcl/Tk 8.5 binaries under $HOME/bin. You can use the above variables to have GRASS use the Tcl/Tk 8.5 binaries instead. .PP \fC .DS .br GRASS_TCLSH = $HOME/bin/tclsh8.5 .br GRASS_WISH = $HOME/bin/wish8.5 .br .DE \fR .SS Example Use of the GRASS Python Environment Variable .PP \fC .DS .br GRASS_PYTHON=python2.5 .br .DE \fR .SS Addon path to extra local GRASS modules This environment variable allows the user to extend the GRASS program search paths to include locally developed/installed addon modules which are not distributed with the standard GRASS release. .PP \fC .DS .br GRASS_ADDON_PATH=/usr/mytools .br GRASS_ADDON_PATH=/usr/mytools:/usr/local/othertools .br .DE \fR .PP In this example above path(s) would be added to the standard GRASS path environment. .SS HTML browser variable The GRASS_HTML_BROWSER environment variable allows the user to set the HTML web browser to use for dispalying help pages. .SS Location Environment Variables .PP The Synopsis and Options sections above describe options that can be used to set the location and mapset that GRASS will use. These values can also be set with environment variables. However, specifying the location and mapset variables on the command line will override these environment variables. The available variables are as follows: .IP "\fBLOCATION\fR .br A fully qualified path to a mapset (eg /usr/local/share/grassdata/spearfish60/PERMANENT). This environment variable overrides the GISDBASE, LOCATION_NAME, and MAPSET variables. .IP "\fBGISDBASE\fR .br Initial database directory which should be a fully qualified path (eg /usr/local/share/grassdata) .IP "\fBLOCATION_NAME\fR .br Initial location directory which is a subdirectory of GISDBASE .IP "\fBMAPSET\fR .br Initial mapset directory which is a subdirectory of LOCATION_NAME .PP .SS Running non-interactive batch jobs If the GRASS_BATCH_JOB environment variable is set to the \fIfull\fR path and filename of a shell script then GRASS will be launched in a non-interactive way and the script will be run. The script itself can be interactive if that is what the user requires. When it is finished GRASS will automatically exit using the exit-success code given by the script. The script file must have its executable bit set. .SS Note .PP Note that you will need to set these variables using the appropriate method required for the UNIX shell that you use. (e.g. in a Bash shell you must \(dqexport" the variables for them to propogate) .SH EXAMPLES .PP The following are some examples of how you could start GRASS .IP "\fBgrass64\fR .br Start GRASS using the default user interface. The user will be prompted to choose the appropriate location and mapset. .IP "\fBgrass64 -gui\fR .br Start GRASS using the Tcl/Tk based user interface. The user will be prompted to choose the appropriate location and mapset. .IP "\fBgrass64 -text\fR .br Start GRASS using the text based user interface. The user will be prompted to choose the appropriate location and mapset. .IP "\fBgrass64 ~/grassdata/spearfish60/user1\fR .br Start GRASS using the default user interface and automatically launch into the given mapset, bypassing the mapset selection menu. .IP "\fBgrass64 -gui -\fR .br Start GRASS using the Tcl/Tk based user interface and try to obtain the location and mapset from environment variables. .PP .SS Other examples There are a variety of ways in which the \fIlocation environment variables\fR (see above) can be used to specify the mapset to use. The following are some possible examples. .IP "\fBExample 1\fR .br The environment variables are defined as follows: .br LOCATION = /usr/local/share/grassdata/spearfish60/PERMANENT .br GISDBASE = /usr/local/share/grassdata .br LOCATION_NAME = spearfish60 .br MAPSET = PERMANENT .br Start GRASS with the following command: .br grass64 - .br GRASS will start with the mapset defined by LOCATION since the LOCATION variable overrides the other variables. .br .IP "\fBExample 2\fR .br The environment variables are defined as follows: .br GISDBASE = /usr/local/share/grassdata .br LOCATION_NAME = spearfish60 .br MAPSET = PERMANENT .br Start GRASS with the following command: .br grass64 - .br GRASS will start with the mapset defined by GISDBASE/LOCATION_NAME/MAPSET. .br .IP "\fBExample 3\fR .br The environment variables are defined as follows: .br LOCATION = /usr/local/share/grassdata/spearfish60/PERMANENT .br GISDBASE = /usr/local/share/grassdata .br LOCATION_NAME = spearfish60 .br MAPSET = PERMANENT .br Start GRASS with the following command: .br grass64 /usr/home/grass/data/thailand/forests .br GRASS will start with the mapset /home/grass/data/thailand/forests which overrides the environment variables. .br .IP "\fBExample 4\fR .br The environment variables are defined as follows: .br LOCATION = /usr/local/share/grassdata/spearfish60/PERMANENT .br GISDBASE = /usr/local/share/grassdata .br LOCATION_NAME = spearfish60 .br MAPSET = PERMANENT .br Start GRASS with the following command: .br grass64 swamps .br GRASS will start with the mapset defined by GISDBASE/LOCATION_NAME/swamps since the command line argument for the mapset overrides the environment variable MAPSET. .br .IP "\fBExample 5\fR .br The environment variables are defined as follows: .br LOCATION = /usr/local/share/grassdata/spearfish60/PERMANENT .br GISDBASE = /usr/local/share/grassdata .br LOCATION_NAME = spearfish60 .br MAPSET = PERMANENT .br Start GRASS with the following command: .br grass64 thailand/forests .br GRASS will start with the mapset defined by GISDBASE/thailand/forests since the command line arguments for the location and mapset overrides the environment variables LOCATION_NAME and MAPSET. .br .PP .SH CAVEAT If you start GRASS using the Tcl/Tk interface you must have a wish command in your $PATH variable. That is, the command must be named wish and not something like wish8.3. By default, some Tcl/Tk installations do not create a wish command. In these cases the system administrator must create an appropriate link to the actual wish program. .PP For example, suppose Tcl/Tk 8.3 programs are installed in /usr/local/bin. Then the system administrator should go to the /usr/local/bin directory and run the commands "ln -s wish8.3 wish" and "ln -s tclsh8.3 tclsh" to properly install Tcl/Tk for use with GRASS. .PP Furthermore, if you have more than one version of Tcl/Tk installed, make sure that the version you want to use with GRASS is the first version found in your $PATH variable. GRASS searches your $PATH variable until it finds the first version of wish. .SH FILES \fI$UNIX_BIN/grass64\fR - GRASS startup program (Linux, MacOSX etc.) .br \fI$WINDOWS_BIN/grass64.bat\fR - GRASS startup program (MS-Windows) .br \fI$GISBASE/etc/Init.sh\fR - GRASS initialization script called by \fIgrass64\fR .br \fI$GISBASE/etc/gis_set.tcl\fR - Tcl/Tk script to set the location and mapset to use. Called by \fIInit.sh\fR .br .SH SEE ALSO List of implemented GRASS GIS environment variables. .PP GRASS GIS Web site .PP GRASS GIS 6 Programmer's Manual .SH AUTHORS (of this page) Justin Hickey .br Markus Neteler .br Hamish Bowman .PP \fILast changed: $Date: 2014-05-14 10:11:57 +0200 (Wed, 14 May 2014) $\fR .PP Help Index