HOME     OBJECTIVE     UNINSTALL     INSTALL     INSTALL (CD)     SPEARFISH     BASH     READY?    
NOTES     QUESTIONS     LINKS     TO DO     FEEDBACK     PROBLEMS     SESSIONS: 01   02   03

Session 01: Simple commands

  1. All the "how-to-do-it" instructions on this webpage presuppose that you have done all the things described in Starting Point: Installed, and you are in compliance with the way things are supposed to look.

  2. We now have WinGRASS (with suitable sample data) all installed on our computers and we are now ready take it around the block. My startup screens look like this: :
    desktop
    CLICK TO ENLARGE

  3. WinGRASS operated differently from any Windows program of which I am aware. It bears saying at the outset, that everything that happens in WinGRASS could have been done in the Cygwin Bash window (the small window on the left) using the command line or text forms. The spiffy window on the right (as I have placed them), The "GRASS 6.0.0 GIS Manager", is pretty much a snazzy macro manager for generating commands Bash window commands that are somewhat foreign to a typical Windows user (but you'll need to learn about them anyway!). There is nothing that can be done with the GRASS 6.0.0 GIS Manager (which we'll call GUI, for short), that cannot be done via command line in the Bash window. There are, we are told, some things that must be done in the Bash window via command line because they have not yet been incorporated into the GUI. For this reason, I believe that it is a good idea to look at both methods for any command we try to use. There seem to be additional GRASS features, not included in our default download, that we may find need for later which would be more likely not to have been included in the GUI.

  4. Viewing the main help screen
    • In the Bash window, we are told that we can obtain help by entering:
      g.manual -i
      When I do that, I see this screen:
      Help
      CLICK TO ENLARGE
      bringing up the main help file in Interet Explorer.

    • If I exit from IE, and click on Help in the GUI, then click on Grass Help, we get exactly the same results.

    TOP

  5. If you have executed any command in the GUI (as immediately above), you can return to use of Bash window by clicking on the blue bar at its top, which feels fairly familiar to a windows user.

  6. Following the above actions, the Bash window now looks like this
    Bash01

    I rather expected to see the command "g.manual -i" show up an additional time due to clicking on "Help" in the GUI, but it did not. This would lead me to believe that the GUI replicates most (but not all) Bash commands, but does so directly without using the Bash window. Interesting.

    TOP

  7. Let's try another of the commands suggested on the Bash screen, "g.version -c". The Bash screen now looks like this:
    Bash02

    You can no longer see the earlier Bash text displayed, but I can assure you they are still present. Click on the middle button at the top right of the window. The Bash window now looks like this:

    Bash03
    CLICK TO ENLARGE

    This fills your screen, and I have cropped to show only the upper left. You can now see all text displays for this Bash session. The slider bar at the right (not shown) still does nothing a Windows user would expect it to do. Let's see if we can make it work.

    If the Bash window is not selected, you may do so by clicking on its blue top bar. Note that by clicking on the up and down arrows on your keyboard that you can recall all previous entries made this session, which will display in turn at the command prompt. Use the arrow keys as needed to make "g.version -c" appear. Click enter to execute the command an additional time. All we want to do here is to "overfill" the display screen.

    It does and the full screen Bash has is filled with text from top to bottom. I discovered that by right clicking (or left-clicking, whichever worked!) on the "slider bar" at the right of the screen, that all of the Bash text display for this session could be scrolled up or down. My mouse has two buttons and a center wheel. The wheel can also be used to scroll the session text up and down.

    You can click on the middle button at the upper right of the Bash window, reducing it back to its former small size, and whatever worked with your mouse on the full screen to scroll the Bash text for this session works just as well with the smaller Bash window.

    TOP

  8. At the command prompt of the Bash window, I found the following to work in editing any currently displayed "command":
    • Backspace and Delete keys work as I would expect them to
    • Anything I typed was in "insert" mode, and pressing the Insert key on my keyboard did not alter this (an odd character was inserted, instead).
    • left and right arrow keys, Home and End worked as I expected them to.
    Sooner or later, you will be confronted with a text form displayed in the Bash window which you will need to complete and execute. Do not expect the same rules that apply to editing the command line to work for text form completion. More on that later.

  9. Use whatever works with your mouse to scroll the Bash window back to the very top, to see what appeared on the initial startup screen. [It is also seen in the 3rd image shown on this webpage, but doing it that way is wimpy!]. Note that there is a line there that says:
    If required, restart the graphical user interface with: d.m &

    • Comments:
      • The tutorials I have found are based on GRASS versions other than WinGRASS, and do not mention the use of "d.m &". The commands I have seen suggested included "tcltk" somewhere in the command, and I have seen several variants of this. In the WinGRASS application, we are operating in GRASS and using the GRASS command "d.m &", and in the progression of steps to load GRASS, we are beyond the point where "tcltk" (or variants) would be used. We will try later to see how we may use (or may not use) some of the available tutorials.
      • Most commands entered in the Bash window will end with an ampersand (&). This means "execute the command but leave the present window open". Note that the "Exit" command does not require it.
      • It is my present opinion that one will experience less problems by not using the the X in the upper right corner of the Bash window or in the GUI window (which the typical Windows user would intuitively do). I.e., when exiting from the GUI, use File, Exit, and when exiting from the Bash window, execute the command "exit". In experimentation before making this webpage, I managed somehow to slightly botch my start-up procedure so that the Grass entry screen no longer appeared and I found it necessary to execute a text form in Bash to enter the GUI (more on how to that later). I received some suggestions for correcting the problem, but finally had to remove and re-install WinGRASS to correct the problem.

  10. Exit from the GUI by clicking on File, Exit.

  11. Restart the GUI by entering the command
    d.m &
    in the Bash window.

  12. The GUI comes right back up, as promised, but requires dragging to wherever you want it on your desktop.

  13. With the GUI selected (click on its blue top bar if needed): Hold down Control and click Q on your keyboard (i.e., Ctl-Q, in Windows terminology). Note that this also exits from the GUI (in an acceptable manner).

  14. Select the Bash window (clicking on its blue top bar as needed). Use you keyboard arrow keys to redisplay the command
    d.m &
    and hit enter to exectue the command.

    ...and once again, the GUI comes right back up, as promised.

TOP

References
  • GRASS GIS 6.0.0 Reference Manual, available as "Help" in the GUI, or in the Bash as described above. Under "Manual sections:", you will find "general commands" and "display commands". Clicking on either lets you drill down to see the commands and subcommands available.
  • The Linux Users Guide (1.1mb), 1996, on manual page 46 (differs from .pdf page), discusses scrolling in an X-window, but it essentially says "do what works with your mouse", which is what I concluded by trial and error.

TOP

Comments or suggestions?