Why not upgrading your QGIS version?
To know the GRASS path, you need to know how Processing really works.
- First, it is a Python module (processing) that uses subprocess to execute the original GRASS commands.
- Consequently, the script need to know the Grass installation path.
With Python in the console, you can obtain the default path (I suppose you use the Kyng Chaos version).
1) For Grass 6.4.x
The script to find the default Grass path is:
/Applications/QGIS.app/Contents/Resources/python/plugins/processing/algs/grass/GrassUtils.py #lines 256-258 for your QGIS version
import processing
# you want to use here the Grass algoritm
import processing.algs.grass.GrassUtils as ga6
ga6.GrassUtils.grassPath()
u'/Applications/QGIS.app/Contents/MacOS/grass'
Therefore, by default, processing uses the GRASS version installed into the QGIS application with the script grass.sh to launch GRASS and execute commands.
import os
os.path.exists(ga6.GrassUtils.grassPath() + os.sep + 'grass.sh')
True
You can let the Processing Options (path to GRASS) empty. QGIS always find the path.
If you want to use another GRASS version (GRASS-6.4.6.app for example), simply change the parameters in the Processing Options with a folder path that contains the grass.sh script (/Applications/GRASS-6.4.6.app/Contents/MacOS
for example).
os.path.exists('/Applications/GRASS-6.4.6.app/Contents/MacOS/grass.sh')
True
# and
ga6.GrassUtils.grassPath()
/Applications/GRASS-6.4.6.app/Contents/MacOS
os.path.exists(ga6.GrassUtils.grassPath() + os.sep + 'grass.sh')
True
Result:
2) For Grass 7.x
Same procedure and the file is:
/Applications/QGIS.app/Contents/Resources/python/plugins/processing/algs/grass7/Grass7Utils.py
import processing.algs.grass7.Grass7Utils as ga7
ga7.Grass7Utils.grassPath()
'/Applications/GRASS-7.0.app/Contents/MacOS'
import os
os.path.exists(ga7.Grass7Utils.grassPath() + os.sep + 'grass70.sh')
False
Problem here, I have a GRASS-7.0.app (from GRASS GIS for Mac) installed but no /Applications/GRASS-7.0.app/Contents/MacOS/grass70.sh
script. The script to launch GRASS-7.0.app is /Applications/GRASS-7.0.app/Contents/MacOS/grass.sh
The solution is to replace grass70.sh by grass.sh in the lines 254-256 of the script Grass7Utils.py
Original:
if isMac() and os.path.exists(Grass7Utils.grassPath() + os.sep + 'grass70.sh'):
command = Grass7Utils.grassPath() + os.sep + 'grass70.sh ' \
+ Grass7Utils.grassMapsetFolder() + '/PERMANENT'
Correction:
if isMac() and os.path.exists(Grass7Utils.grassPath() + os.sep + 'grass.sh'):
command = Grass7Utils.grassPath() + os.sep + 'grass.sh ' \
+ Grass7Utils.grassMapsetFolder() + '/PERMANENT'
Result:
Hope this will help you but there are many problems with El Capitan (from GRASS GIS for Mac and Grass Gis 7 does not start in OS X 10.11 El Capitan)
WARNING: current GRASS binaries may not work with EL CAPITAN - OS X 10.11 unless you disable "System Integrity Protection".
Best Answer
Both QGIS and GRASS GIS are standalone applications which can be used on their own. QGIS is using some of the functionality from GRASS GIS through QGIS GRASS Plugin and through QGIS Processing. Each of these can support some of the tools available in GRASS GIS or somehow modifies their usage. In this context, the functions or tools in GRASS GIS are called modules. Not all these modules are supported by QGIS, either because they simply were not added to the list or QGIS is not able to accommodate their interface.
Both QGIS GRASS Plugin and QGIS Processing support both GRASS GIS 6 and 7. QGIS is currently transitioning from version 6 to 7, so the different distributions of QGIS can include different versions. The plugin or Processing can be configured to use one or the other once it is installed. In OSGeo4W, GRASS GIS 7 is currently probably in an advanced installation.
Some of the GRASS GIS modules are not part of the standard GRASS GIS installation and their are available in GRASS GIS Addons repository. You can install them in GRASS GIS using GUI or
g.extension
module. These cannot be used in QGIS because Processing nor the plugin (at least currently) support arbitrary modules, just the ones specified in QGIS. For example,i.segment
was an addon at one point but now it is included in GRASS GIS directly. Some addons stay just addons.If you want full access to everything in GRASS GIS, use GRASS GIS directly. QGIS GRASS Plugin will help you transition back and forth. A lot of people are using this workflow.
This was a general answer which seems appropriate now. If you have specific issues with using QGIS and GRASS GIS together, I suggest you to search the existing questions first and if this doesn't help, ask another one.