<div dir="ltr">Thanks Martin for your response. Actually, cairo is good idea, however, what I am trying to do is building an app. I have already invested lots of my time developing interactive gui as shown in the attached screenshot. My ultimate plan with grass gis is mentioned in the red-box in attached screenshot.<div><br><div><div>I have a feeling that this process should work as expected. </div><div>1. Isn't there any way to make grass gis run in background or some kind of temporary directory?</div><div>2. Is there any way that can run the GRASS GIS COMMAND SHELL without running the wxgui?</div><div>2. Interestingly in d.mon document it says that  "The desired monitor should be started once and need not be restarted unless it is stopped for some reason. A monitor may continue to run for any length of time, even when no GRASS session is being run." But don't know what these exactly means if working through standalone script.</div></div></div><div><br></div><div>I will be really grateful if you could show me some way to make this work. </div><div>Will be looking forward to hearing from you.</div><div><br></div><div><br></div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div style="font-size:12.8px"><b>Regards,</b></div><div style="font-size:12.8px"><b>Ang Dawa Sherpa</b></div><div style="font-size:12.8px"><b>GIS technician - Irrigation Master Plan</b></div><div style="font-size:12.8px"><b>WRPPF - DOI, Nepal Government</b></div><div style="font-size:12.8px"><b>Lalitpur</b></div><div style="font-size:12.8px"><b>contact: 984 007 3861</b></div></div></div></div>
<br><div class="gmail_quote">On Wed, Jan 4, 2017 at 5:02 PM, Martin Landa <span dir="ltr"><<a href="mailto:landa.martin@gmail.com" target="_blank">landa.martin@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<span class=""><br>
2017-01-04 11:59 GMT+01:00 Ang Sherpa <<a href="mailto:angsherpa232@gmail.com">angsherpa232@gmail.com</a>>:<br>
> My script work from "Launch Script" command within Grass Gis environment.<br>
> However, as a standalone script it just executes nothing not even error. So,<br>
> sleep.time(2) is also not working as expected. Am I missing something?<br>
> I have attached the script that I used herewith this mail.<br>
><br>
> Will be looking forward to hearing from you.<br>
<br>
</span>interactive monitors require running GRASS. It is probably reason why<br>
wx monitor is not even launched since your script already terminates<br>
(and GRASS session too). It has no reason to use interactive monitors<br>
outside of GRASS. If you modify your script like:<br>
<br>
gscript.run_command('d.mon', stop='wx6') # we asssume that there is<br>
already monitors hanging from last run<br>
gscript.run_command('d.mon',<wbr>start='wx6',resolution='1')<br>
time.sleep(2)<br>
gscript.run_command('d.rast',<wbr>map='elevation')<br>
time.sleep(200)<br>
os.remove(rcfile)<br>
<br>
Then monitor shows and will running 200sec. But it has no sense. So I<br>
suggest you to use:<br>
<br>
1) file-based monitors (which is natural for script, generate<br>
something, render to file and close)<br>
<br>
script.run_command('d.mon',<wbr>start='cairo',resolution='1',<br>
output="/path/image.png")<br>
# no need to sleep<br>
gscript.run_command('d.rast',<wbr>map='elevation')<br>
gscript.run_command('d.mon', stop='cairo')<br>
<br>
or<br>
<br>
2) launch your script from running GRASS<br>
<br>
Ma<br>
<div class="HOEnZb"><div class="h5"><br>
--<br>
Martin Landa<br>
<a href="http://geo.fsv.cvut.cz/gwiki/Landa" rel="noreferrer" target="_blank">http://geo.fsv.cvut.cz/gwiki/<wbr>Landa</a><br>
<a href="http://gismentors.cz/mentors/landa" rel="noreferrer" target="_blank">http://gismentors.cz/mentors/<wbr>landa</a><br>
</div></div></blockquote></div><br></div>