[GRASS-dev] Re: diff to start wingrass with GUI + com.exe terminal [was: Re: [winGRASS] (no subject)]

Moritz Lennert mlennert at club.worldonline.be
Mon May 21 07:38:45 EDT 2007

On 21/05/07 12:40, Paul Kelly wrote:
> Hello Moritz
> (Cc grass-dev; sorry I'm not subscribed to the wingrass list)
> On Mon, 21 May 2007, Moritz Lennert wrote:
>> On 21/05/07 02:27, Moritz Lennert wrote:
>>> Paul,
>>> The attached diff makes it possible to launch GRASS in GUI mode with an
>>> accessible cmd.exe window by simply clicking on grass63.bat.
>>> This makes winGRASS look a bit more like *nix GRASS in that it allows
>>> access to both the GUI and the command line at the same time. Until now,
>>> the only way to get this was to launch GRASS in text mode from the 
>>> cmd.exe
>>> command line.
>>> Anything against me committing this ?
>> Just after shutting down my computer I realised that this probably 
>> only works on my machine because I have msys installed and the msys 
>> lib&bin in my path, so it probably is not a generalisable idea... Will 
>> have to try tonight when I'm in front of a Win machine again.
> Yes launching gis.m using the "gis.m" shell script depends on having a 
> shell interpreter - that's why init.bat runs "gm.tcl" directly.
> But it wouldn't be too hard to re-arrange init.bat to have a 
> command-line GRASS session also open when the GUI was running. At the 
> minute there's a redundant cmd.exe Window running in the background 
> anyway, but I was hoping to hide it. The idea being you really don't 
> need it and I thought it was a bit messy they way it stays open when 
> you're running Init.sh rather than init.bat.

When running init.bat it also remains open, but not "accessible". Just 
sits in the background.

> But, I suppose maybe it would be a gentle introduction to command-line 
> GRASS for Windows users if the other Window was open in the background 
> and they were able to use it. It would complicate things though, as they 
> would have to type exit in the command-line Window to exit it *after* 
> shutting down gis.m; 

Actually, even if you type exit, the command line windows "waits" for 
the GUI to terminate before it closes.

> I worry that it would make GRASS look cumbersome 
> and awkward. Was thinking perhaps an option button in gis_set.tcl (the 
> first Tcl/Tk window that allows you to select the location) to open 
> either GUI or Command-line Windows or both might be a nice idea?

Yes, maybe that would be better, or even an option in the GUI to launch 
a command-line window...

> I was going by the thinking that it was a historical accident that GUI 
> and command-line were available at the same time with Init.sh, and with 
> improvements to the GUI it would eventually incorporate a sort of 
> command-line interface (like an improved gronsole.tcl) 

I think we will have to wait for wxgrass to get a serious integrated 
CLI...until then for me a separate CLI is a must.

> and a separate 
> command-line Window wouldn't be necessary, but if we feel that it's good 
> to have it there to emphasis the power of GRASS then we can definitely 
> put it into init.bat too.

I personally like the combination because it allows easy scripting (e.g. 
looping) while still giving the "comfort" of the GUI. But maybe it is 
better to leave as is, i.e. if you want the combination, you have to 
launch GRASS in text version, make sure msys or another shell is in your 
  path and then launch gis.m. Assuming that those who are comfortable 
using the command line are also comfortable doing the extra installation 


More information about the grass-dev mailing list