[GRASS-dev] what's going on in r39326

Hamish hamish_b at yahoo.com
Wed Sep 30 10:09:49 EDT 2009

thanks all for the clarifications. The bit which was missing
for me was finding context for it due to the "why".

Paul Kelly wrote:
> If I understand correctly, the patch is attempting to solve
> two separate issues:
> 1) When starting GRASS by double-clicking on the grass64.sh
> icon, the user doesn't get a terminal window in which to
> enter GRASS commands.

this should be handled by ticking the "run in terminal" box
when setting up the launcher.

In the latest Debian package we have set 'needs="text"' in the
menu entry:

(just added in svn65 source gui/icons/, other branches soon)

and "Terminal=True" in the desktop icon setup:

(already in source in gui/icons/)

and to complete the offerings a "x-grass" script for starting
grass in a terminal without needing to set it up as above.
for now it exits with error if it can't get a terminal.

(this was debian bug#503371)

maybe those help.
IMO the packaging is the correct place to set this stuff up.

As mentioned by others there are valid times when you don't
want a terminal. (the WinGrass installers don't open terminals
unless you ask for them) [note some .sh replaced by .bat there]

> 2) GRASS doesn't exit properly because the Init.sh runs in
> the background waiting for user input that never arrives.

the above should take care of that. At least from the GRASS
desktop icon the last thing I see is "cleaning up temp files.."

veering off-topic:
IMO it is a mistake to have shutting down the GUI try to close
down the terminal as well. If GUI is started from the terminal
with g.gui this is definitely not what you want.

> Point (1) seems to me just an issue of user preference. I
> would be wary of anything that assumes the user is wrong, or
> the user doesn't know what they want, which this fix seems
> to do. Perhaps they only want the GUI and don't want a
> terminal window to pop up?

I agree

> Regarding point (2), why not just launch the GUI in the
> foreground instead of the background? When it exits, control
> will be returned to Init.sh which can then clean up and
> exit. The check for whether there is no terminal attached
> could be used to force GUI rather than text mode.

fyi in 6.5 and 7 g.gui now backgrounds the gui, but the init.sh
and AFAIK guis themselves do not. (I think gis.m used to)



More information about the grass-dev mailing list