[GRASS5] New initialization code

Justin Hickey jhickey at hpcc.nectec.or.th
Thu Nov 30 02:49:34 EST 2000


Hi all

Andreas Lange wrote:
> the $DISPLAY is IMHO the best solution to the discussed problem.
> Check if $DISPLAY is set and you know for sure that X is running.
> If you next search for the wish executable in the user path i think
> that in most of the cases this should work and we can start with the
> GUI first. Otherwise a fallback to text mode would be ok.
> This applies to the windows setup too, as the DISPLAY variable is set
> only if X is running (The X server seems still to be a little 
> unstable). I'll check for the name of wish/tk shell in cygwin later.

OK so in summary, we check for X windows by checking for $DISPLAY. If
$DISPLAY is set we then search the path for wish. If this is found, we
have a check in the first Tcl script to be used (gis_set.tcl I guess)
which determines if the version of this wish is greater than or equal to
8.0. Then we go for GUI mode. If any of these fail we revert to text
mode and possibly print a message.

For the default mode, the command line will override everything, an
environment variable will override the gisrc file and the internal
default, and the gisrc file will override the internal default. The
internal default will remain as tcltk mode. The first time a user starts
grass whatever the mode selected will be written to the gisrc file.

Does anyone have any objections to these strategies? If not, I will
implement in the next day or so.

Eric Mitchell wrote:
> On Unix systems, "ln -s `which wish` $GISBASE/bin/grasswish".
> Any desired wish could be used, configure could take a 
> --with-wish=/path/to/mywish argument for configurability, 
> or check for "wish, wish8.0, etc." for known working versions.

This is interesting, unfortunately, I have two concerns with this
proposal. I assume that the link operation would be performed at compile
time. Thus if a user does not have Tcl/Tk installed when he/she installs
Grass, then tcltkgrass is still installed but of course it will not work
and the link above will not work. Then the user installs Tcl/Tk and then
he/she has to recompile part of Grass to get tcltkgrass to work. Thus
more work and inconvenience for the user.

The second concern is that we would also have to change the binary
distribution scripts. And a user that does not have Tcl/Tk installed
initially, will have to type the link command themselves. Again more
work and inconvenience for the user.

Not a bad idea, but I think it introduces inconvenience to the user that
we can avoid using other methods.

As always, please feel free to comment on these proposals.

-- 
Sincerely,

Jazzman (a.k.a. Justin Hickey)  e-mail: jhickey at hpcc.nectec.or.th
High Performance Computing Center
National Electronics and Computer Technology Center (NECTEC)
Bangkok, Thailand
==================================================================
People who think they know everything are very irritating to those
of us who do.  ---Anonymous

Jazz and Trek Rule!!!
==================================================================

---------------------------------------- 
If you want to unsubscribe from GRASS Development Team mailing list write to:
minordomo at geog.uni-hannover.de with
subject 'unsubscribe grass5'



More information about the grass-dev mailing list