[GRASS-dev] GRASS_BATCH_JOB vs GUI

Hamish hamish_b at yahoo.com
Fri Apr 4 21:56:39 EDT 2008


William Kyngesburye wrote:
> I was discussing with someone running GRASS in batch mode, and it's  
> not clear what is possible with respect to X11, display windows, TclTk 
> or Python.
> 
> I see that in init.sh, a batch script is forced to run in text mode.   
> Still, a module run without options (intentionally or not) would try  
> to bring up a TclTk window and require user interaction,

just because GRASS is started in text mode doesn't mean that module GUIs
won't work (this is how I use GRASS), just that the main GUI isn't
automatically started. 

> thus potentially disrupting the flow of the script.

that only matters if *you* expect the script to run without interaction.
GRASS itself doesn't care if the script pauses while a user fills out a
form.

> Certainly running either the TclTk or Python GUIs in a batch script is 
> not desirable, but maybe there are possibilities I don't see?

the full GUI isn't really useful here, but theoretically you could launch
it if you really wanted to.

You can pre-populate a module's GUI by setting options and flags on the
command line then forcing a GUI with the --ui flag.

> Display windows may be useful in a batch script - or not?

sure, it's a slightly different concept, but for custom apps, why not?
See the d.ask and d.menu modules for more interactive scripting fun
(those won't survive into GRASS 7 in their current state, but could be
rewritten to launch custom wx|tcl GUI windows).


FYI, AFAIR the latest batch mode changes to init.sh have not been
backported to the 6.3.0 branch- but I think they are just cosmetic.


Hamish



      ____________________________________________________________________________________
You rock. That's why Blockbuster's offering you one month of Blockbuster Total Access, No Cost.  
http://tc.deals.yahoo.com/tc/blockbuster/text5.com



More information about the grass-dev mailing list