[GIS] Using GRASS command line tools within QGIS

grassmacqgis

How do I use the GRASS command line tools within QGIS?

I use the QRASS plugin to open the mapset, and then I open the GRASS tools window. I click on 'GRASS shell' under modules and it brings up a bash terminal, which says:

bash: /sw/bin/init.sh: No such file or directory
bash-3.2$

I assume init.sh was supposed to open some GRASS command line program, but it failed to find it. Does anyone have any suggestions for how to procede?

Some background, any advice will be gratefully received: I'm trying to teach myself GRASS using the third edition of "Open Source GIS: A GRASS Approach" by Neteler and Mitasova. Unfortunately it appears that the book is somewhat out of date, designed for GRASS 6-3, while I have GRASS 6-4. This means that some of the GUI stuff doesn't work (particularly d.mon, I believe it has to do with a new Python WxGUI interface) so I can't work through following the examples exactly. I'm hoping that the book will still be mostly relevant in terms of the modules available and the basic GRASS command syntax and use, but I can't follow the instructions that relate to the GUI. For this reason I've decide to ignore the GRASS GUI completely and to just use the QGIS GRASS plug in.

Best Answer

Once you open the GRASS shell, all you have to do is enter the GRASS commands, such as r.in.gdal or r.mask. There should be no need to initialize GRASS. However, I am doing this on a PC, so it might be different with bash.

Related Question