Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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.

share|improve this question
    
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
add comment

1 Answer 1

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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