.TH grass6 1 "" "GRASS 6.1.cvs" "Grass User's Manual" .SH NAME \fI\fBgrass61\fR\fR - The GRASS startup program .br .SH SYNOPSIS \fBgrass61\fR [\fB-\fR] [\fB-v\fR] [\fB-h | -help | --help\fR] [\fB-text | -tcltk | -gui\fR] [[[\fB/\fR]\fB/\fR] \fB\fR] .br .SH DESCRIPTION .PP This program is used to start GRASS. 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 GRASS program will save both the desired user interface and mapset. Thus, the next time the user runs GRASS, typing \fIgrass61\fR (without any options) will start grass with the previous settings for the user interface and mapset. .PP If you specify a graphical user interface (eg Tcl/Tk) the \fIgrass61\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 \fIgrass61\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 Tries to start GRASS using location environment variables (see below) .IP "\fB-h -help --help\fR Prints a brief usage message .IP "\fB-text\fR Indicates that the text based user interface should be used .IP "\fB-gui\fR (or \fB-tcltk\fR) Indicates that the Tcl/Tk based graphical user interface should be used .IP "\fB-v --version\fR Prints the version for GRASS .PP .SS Parameters: .IP "\fBGISDBASE\fR Initial database directory which should be a fully qualified path (eg /usr/local/share/grassdata) .IP "\fBLOCATION_NAME\fR Initial location directory which is a subdirectory of GISDBASE .IP "\fBMAPSET\fR Initial mapset directory which is a subdirectory of LOCATION_NAME .IP "\fBNote\fR You must specify one of the following .br MAPSET .br LOCATION_NAME/MAPSET .br GISDBASE/LOCATION_NAME/MAPSET .br .PP .SH ENVIRONMENT VARIABLES .SS User Interface Environment Variable .PP The \fIgrass61\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 \fIgrass61\fR is run, then it will be created and then saved in the $HOME/.grassrc6 file for the next time GRASS is run. .PP There is an order of precedence in the way \fIgrass61\fR determines the user interface to use. The following is the hierarchy from highest precedence to lowest. .PP The user may add own environment variable settings to $HOME/.grassrc6 file which are used during next startup of GRASS (list of implemented environment variables). .IP "\fBInterface precedence\fR Command line argument .br Environment variable GRASS_GUI .br Value set in $HOME/.grassrc6 .br Default value - currently tcltk .PP .SS Tcl/Tk 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. See the section immediately following the variable descriptions for an example. .IP "\fBGRASS_TCLSH\fR Command to use to override tclsh .IP "\fBGRASS_WISH\fR Command to use to override wish .PP Example Use of GRASS Tcl/Tk Environment Variables .PP Suppose your system has Tcl/Tk 8.0 installed and you install your personal version of Tcl/Tk 8.3 binaries installed under $HOME/bin. You can use the above variables to have GRASS use the Tcl/Tk 8.3 binaries instead. .PP GRASS_TCLSH = $HOME/bin/tclsh8.3 .br GRASS_WISH = $HOME/bin/wish8.3 .SS Addon path to extra local GRASS modules This environment variables allows to extend the GRASS paths to locally developed/installed modules which are not distributes through the standard release of GRASS. .PP GRASS_ADDON_PATH=/usr/mytools .br GRASS_ADDON_PATH=/usr/mytools:/usr/local/othertools .PP In this example above path(s) would be added to the standard GRASS path environment. .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 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 Initial database directory which should be a fully qualified path (eg /usr/local/share/grassdata) .IP "\fBLOCATION_NAME\fR Initial location directory which is a subdirectory of GISDBASE .IP "\fBMAPSET\fR Initial mapset directory which is a subdirectory of LOCATION_NAME .PP .PP There are a variety of ways in which these variables can be used to specify the mapset to use. The following are some possible examples. .IP "\fBExample 1\fR 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 grass61 - .br GRASS will start with the mapset defined by LOCATION since the LOCATION variable overrides the other variables. .br .IP "\fBExample 2\fR 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 grass61 - .br GRASS will start with the mapset defined by GISDBASE/LOCATION_NAME/MAPSET. .br .IP "\fBExample 3\fR 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 grass61 /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 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 grass61 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 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 grass61 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 .SS Note .PP Note that you will need to set these variables using the appropriate method required for the UNIX shell that you use. .SH EXAMPLES .PP The following are some examples of how you could start GRASS .IP "\fBgrass61\fR Start GRASS using the default user interface. The user will be prompted to choose the appropriate location and mapset. .IP "\fBgrass61 -tcltk\fR Start GRASS using the Tcl/Tk based user interface. The user will be prompted to choose the appropriate location and mapset. .IP "\fBgrass61 -text\fR Start GRASS using the text based user interface. The user will be prompted to choose the appropriate location and mapset. .IP "\fBgrass61 -tcltk -\fR Start GRASS using the Tcl/Tk based user interface and try to obtain the location and mapset from environment variables. .IP "\fBOther examples\fR See the \fBLocation Environment Variables\fR section for further examples. .PP .SH BUGS AND CAVEAT .PP If you start GRASS using the Tcl/Tk interface you must have a \fIwish\fR command in your $PATH variable. That is, the command must be named \fIwish\fR and not something like \fIwish8.3\fR. By default, a Tcl/Tk installation does not create a \fIwish\fR command. Thus, 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 \fIln -s wish8.3 wish\fR and \fIln -s tclsh8.3 tclsh\fR 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 \fIwish\fR. .SH FILES \fI$UNIX_BIN/grass61\fR - GRASS startup program .br \fI$GISBASE/etc/Init.sh\fR - GRASS initialization script called by \fIgrass61\fR .br \fI$GISBASE/tcltkgrass/script/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 environment variables. .PP GRASS Web site .SH AUTHORS (of this page) Justin Hickey .br Markus Neteler .PP \fILast changed: $Date$\fR .PP Help Index