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

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.

  • E.g. d.mon works perfectly fine with GRASS 6.4. Please always indicate the version number(s) and operating system to receive better help... (BTW: an updated GRASS Book version is in preparation!). – markusN Feb 21 '13 at 14:23

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.