Hello,<br><br>I would like to call GRASS modules from other programs - e.g. shell or perl. The information I found on grass wiki was a bit confusing for me, nevertheless I decided to test this possibility. <br>I added GRASS environmental variables to my .bashrc file: <br>
<br># path to GRASS binaries and libraries:<br>export GISBASE=/usr/lib64/grass-6.3.0<br>export PATH=$PATH:$GISBASE/bin:$GISBASE/scripts<br>export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$GISBASE/lib<br>export GISRC=/home/mirka/grass/gisrc<br>
export GIS_LOCK=.gislock<br><br>Now, when I wrote a script, I create the gisrc file on the fly inside the script, specifying the location and mapset. <br>Then I call a GRASS module, e.g., r.report, directly and it works fine.<br>
However, what bothers me, is the gislock, as it doesn't work properly - i.e., when I run the script outside GRASS it performs an operation on the specified location/mapset combination even in case the same combination of location/mapset is explicitly opened in another terminal. I guess something is wrong with my specification of GIS_LOCK env. variable ... <br>
<br>I am not sure how this is supposed to operate, but what I observe is that the env. variables which I specify in .bashrc file, namely GISRC are only used for the modules called from scripts outside GRASS. When I open a location/mapset combination directly using grass, it creates gisrc file in /tmp/grass6-username-processID directory. <br>
As for the .gislock, I thought it should always be located in the corresponding gisdbase/location/mapset directory. Then, why my scripts ingnore .gislock created by explicitly opened GRASS location/mapset?<br><br>I hope my narration is not too confusing :-)<br>
<br>Jana<br clear="all"><br>-- <br>******************************************<br>Jana Krajčovičová, PhD.<br>
Department of Air Quality<br>Slovak Hydrometeorological Institute<br>Jeséniova 17<br>831 01 Bratislava<br><br><a href="mailto:jana.krajcovicova@shmu.sk" target="_blank">jana.krajcovicova@shmu.sk</a><br><br><br>