[GRASS5] New initialization code
neteler at geog.uni-hannover.de
Wed Nov 29 06:53:20 EST 2000
Hi all friend of GRASS with and without GUI :-)
On Wed, Nov 29, 2000 at 10:46:11AM +0700, Justin Hickey wrote:
> Hello all GUI concerned members
> First of all some history. Way back when Markus and I first discussed
> the new initialization script we agreed that grass should start in GUI
> mode if possible. I thought the e-mail was posted to the developers list
> but since no one complained then, it must have been only private mail.
> Sorry for that.
> The reason for starting up in GUI mode is as Markus claims, average
> users prefer GUI interfaces as compared to text based or command line
> interfaces. This concept has been shown to be a basic software
> engineering principle (at least that is what I remember from my
> courses). Thus, I think it is reasonable to assume that if Grass starts
> in GUI mode by default it will be more attractive to new users as well
> as current users who do not like the text location/mapset selection
> interface (I have had several users ask me if this "intro" screen can be
> changed). Can we agree on this principle?
> If we can, then the problem is not whether grass starts in GUI mode or
> text mode by default, but how can we determine if tcltkgrass will start
> properly. Along those lines, I included code in init.sh that would
> revert back to text mode if wish was not found. This was based on
> Markus' code (correct me if I'm wrong Markus) that tried to search for
> wish8.*. Apparently, this code is not working in all cases and appears
> to have some flaws. Furthermore, it seems there is not a clear
> indication of how we can determine if tcltkgrass will start properly,
> especially concerning Windows.
Well, here I have been causing the confusion. I wasn't aware that "wish"
is a standard link. As wish4.2 has been disappearing the last month,
we will be able to *savely* use "wish" on startup.
Justin, I will remove this wish-search-script stuff now and directly
implement the code-fragment of Andreas.
> A simple way that can be used on UNIX machines is to check if "wish" is
> in the user's PATH. I agree with Andreas that if there is no wish link
> to wish8.* then the Tk system was not installed properly. I have code
> that can search for a command in a PATH so we can easily implement this.
> We can even add a message to indicate that GUI mode is not supported
> suggesting the user to check with the sysadm for the existance of wish.
> As for having a valid wish version, once we determine there is a wish
> command we can have code in tcltkgrass that will check for a minimum
> required wish version. I have seen this done in another Tcl/Tk program
> (Tkman) and we can use similar code to what is in there. I'm not sure
> exactly how it worked, but it seems to be feasible.
Sounds good as well. We need wish >= 8.0
> For Windows machines, it appears that tcltkgrass does not even work in
> that environment yet (is this right Andreas?). In this case, we should
> be able to detect a Windows operating system (using uname perhaps?) and
> revert back to text mode until tcltkgrass can run in Windows.
Yes, like that it should be possible to add platform sensivity.
> I am not familiar with why we had to search for wish8.* or with the bit
> of code (the next line restarts using wish thing) that Andreas posted
> below, so maybe my suggestion is naive and doesn't account for all the
> problems. But I feel the above suggestion is reasonable and as far as I
> can see should work.
> Regarding the desire to have grass5 start in text mode for seasoned
> users (without a flag), I would prefer that the user start grass the
> first time with grass5 -text. Then if this is detected, the following
> line will be appended to the user's bashrc, cshrc, etc.
> alias grass5 'grass5 -text'
> The user could also create the alias beforehand, thus never needing to
> use "grass5 -text".
> The only thing I would need to check is overriding with "grass5 -tcltk".
> However, I am pretty sure there is a way to do this. Note that this is
> only my preference and I will implement whatever method the list agrees
> to. And yes, Markus, your solution is feasable as well.
Maybe it would be more simple to store the preference in .grassrc5 instead
of modifying so many .<shell>rc's. Storing in a file strongly related to
GRASS might be more save against user modifications (if they change their
.<shell>rc manually or whatever).
> That's just my 2 cents worth.
> Andreas Lange wrote:
> > And again for the wish-path:
> > why not use this fragment:
> > #!/bin/sh
> > # the next line restarts using wish \
> > exec wish "$0" "$@"
> > for all modules? There may be a more complicated version of this
> > around, but this would do IMHO.
> > A short explanation how the user can add the wish-path to her/his
> > executable path would suffice in this case. If there is no link from
> > wish8.x to wish the system is broken, not GRASS.
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