PREVIOUS     CONTENTS     EXERCISES     NEXT    

Bash and/or GUI?

When you have started WinGRASS 6.0 (which you know is the regular GRASS 6.0 which has been adapted to run on computers with Windows operating system), your desktop will look like this:

desktop
CLICK TO ENLARGE

On the left is the Bash window.

Bash

This is equivalent to the "terminal window" described in earlier tutorials. It is a terminal for the Linux environment which GRASS must have to run, but which has been made to run on a computer running under Windows. It is similar in many ways to the window one sees in Windows, by using Start, Run, Cmd (or what was formerly the MS-Dos window), except that it is advanced a step, in that GRASS 6.0 is already running. Those with experience in MS-Dos will find that executing commands from the command prompt (on on the command line, as it is sometimes called), is very similar to the way it was done in MS-dos. There is a reason for this: MS-dos was designed to emulate many of the features of UNIX. It very dissimilar to the Windows Cmd window in that it capable of executing 4 "layers" of commands:

  1. GRASS commands (or "modules")
  2. Cygwin (the program creating the "Linox window) commands (or utilities)
  3. Linox/UNIX commands, and
  4. "DOS" commands (some directly, e.g., "chkdsk", and any if preceded by "cmd" and followed by "exit")

While it is possible to execute other than GRASS commands in the Bash window, it is usually inadvisable to do so, since the results can cause harm or are often unpredictable.

We will only be concerned in this session with the GRASS commands.

In early versions of GRASS, the only way to execute commands was from the "command line" in a terminal window similar to this.

More recent versions of GRASS have added an easier-to-use "graphical user interface" (GUI, for short) or as it is sometimes called, the "display manager". This is what is normally displayed on the right side of your desktop (or wherever you chose to drag it with your mouse). It looks like this:

GUI

Operating the GUI will feel familiar to a Windows user. One can start the process of executing a command by left-clicking with a mouse the appropriate heading across the top of the screen, and proceed to "drill down" by left-clicking on appropriate sub-headings until the desired command is located.

Most commands that can be executed from the Bash window can be executed from the GUI. So one is presented with alternative methods for executing almost all commands:

  • Using the command line method in the Bash window (feeling very similar to executing from the command prompt in MS-dos, which many of us still miss!), or
  • Mouse-clicking on the GUI (feeling very similar to typical Windows programs).
and in most cases, it is simply a matter of which method one is most comfortable in using.

However, the GUI is not a complete replacement for the Bash window. A listing of GRASS commands not yet included in the Display Manager may be found in the Command listings (GUI order)

It is perhaps useful to think of it as a graphical database of macros for executing the commands that can be executed from the command prompt in the Bash window. When a command is executed on the GUI, there is a display on the GUI showing text versions of the command and the output, very similar to that which would have been displayed in the Bash window had the command been executed there.

In one case, both displays are required:

If in the GUI, you use the menu selections
GIS -> Region -> Display region settings
nothing displays in the GUI, but the Bash terminal displays (for our Spearfish data) the following:

Region

If, we select the Bash window, by clicking on its blue top bar, then press
Enter
we will once again see the command prompt displayed. If we then type
g.region -p
(see command reference) followed by
Enter
the Bash window will once again display the results and will look like this:

Region

The Bash window display may be scrolled up and down by clicking on the scroll bar on the right:

  • left-clicking will scroll the window down
  • right-clicking will scroll the window up
  • a mouse with roller wheel can scroll either up or down

Some similarities to normal Windows operation:

  • Either window may be selected by clicking on its blue top bar
  • One can drag either window by left-clicking on the blue top bar, holding the left mouse button down and dragging.
  • Either window may be resized by left-clicking on either side or the bottom border (a double-headed arrow appears), holding the left mouse button down and dragging.
  • The buttons in the upper right corner of either window also operate as they do in Windows.
A difference from what one usually does in Windows:
  • It is best not to use the X button in the upper right corner if any other means is provided to exit a current display or window.
This page replaces TERMINAL OR MENU?

PREVIOUS     CONTENTS     EXERCISES     NEXT