[GRASS5] New initialization code

By default, there is no $DISPLAY environment variable set on Windows.
Windows does not have an X server installed by default. There are
a few on the market that you can purchase, if so interested. If you
are checking for a $DISPLAY env. var., you probably only want to do
so if you're not running on Windows anyway.

However, on Windows, you also have the (potential) problem of how
to start a grass5 environment. This would probably best be
accomplished with a batch file, as you don't have to stress about
the gross platform dependencies. We do this at work: shell
scripts for the unix platforms, batch files for Windows. It seems
to work ok.

Andreas Lange wrote:

Hi Justin, Hi Eric,

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.

Thanks Eric for this idea.
I agree that it is desirable to start up with a nice GUI. Most software,
even if using commands typed in a window, uses a GUI today.

Andreas

Justin Hickey wrote:
>
> Hi Eric
>
> "Eric G . Miller" wrote:
> > One thing you should consider too, is checking if the $DISPLAY
> > environment variable is set. Could be a user is running in a console
> > only mode (console, telnet, ssh with no X forwarding). Haven't a clue
> > about Windows in this regard.
>
> Oooh! Good catch, I never thought of that one. I'll look into it. Does
> this problem even apply on Windows?
>
> Thanks.
>
> --
> Sincerely,
>
> Jazzman (a.k.a. Justin Hickey) e-mail: jhickey@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@geog.uni-hannover.de with
> subject 'unsubscribe grass5'

--
Andreas Lange, 65187 Wiesbaden, Germany, Tel. +49 611 807850
Andreas.Lange@Rhein-Main.de - A.C.Lange@GMX.net

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

--
+=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=+
| Eric B. Mitchell mailto:emitchell@altaira.com |
| tel: (301) 809 - 3534 Altair Aerospace Corporation |
| tel: (800) 7 - ALTAIR 4201 Northview Dr. Suite 410 |
| fax: (301) 805 - 8122 Bowie, MD 20716 |
+=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=+
              ,___
          /"\ / o=\ /"""---===/
         / \_/ \__/ ---===/
         | //\ || /""TT""/ //\ || ||""\
         | // \ || || // \ || ||__/
         | //--==\ |L--/ || //--==\ || || "=,
          \ ---===/
           \____---===/

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

Hi Eric,

the cygwin setup is something like Unix inside Windows.
You can only start the grass command shell from within the cygwin shell
(bash). It would be very complicated to set up a batch script to start
the grass shell, as e. g. the symbolic links are simulated on Win9x by
the cygwin shell. And you'll not be able to execute shell scripts, as
the magic line #!/bin/sh is only interpreted by the cygwin shell.

If you start the X server from within the cygwin shell, the DISPLAY env
var will be set. I have not tested if the X11R6.4 X server sets the
DISPLAY var for the user env in windows.

I have tested that i can run the old grass5 shell from within cygwin.
Apart from the problems with the keys (there is IMHO an unrecognized
terminal type set) it already works. You can do everything except the
d.* functions and tcltkgrass/wish scripts.

cu,

Andreas

Eric Mitchell wrote:

By default, there is no $DISPLAY environment variable set on Windows.
Windows does not have an X server installed by default. There are
a few on the market that you can purchase, if so interested. If you
are checking for a $DISPLAY env. var., you probably only want to do
so if you're not running on Windows anyway.

However, on Windows, you also have the (potential) problem of how
to start a grass5 environment. This would probably best be
accomplished with a batch file, as you don't have to stress about
the gross platform dependencies. We do this at work: shell
scripts for the unix platforms, batch files for Windows. It seems
to work ok.

Andreas Lange wrote:
>
> Hi Justin, Hi Eric,
>
> 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.
>
> Thanks Eric for this idea.
> I agree that it is desirable to start up with a nice GUI. Most software,
> even if using commands typed in a window, uses a GUI today.
>
> Andreas
>
> Justin Hickey wrote:
> >
> > Hi Eric
> >
> > "Eric G . Miller" wrote:
> > > One thing you should consider too, is checking if the $DISPLAY
> > > environment variable is set. Could be a user is running in a console
> > > only mode (console, telnet, ssh with no X forwarding). Haven't a clue
> > > about Windows in this regard.
> >
> > Oooh! Good catch, I never thought of that one. I'll look into it. Does
> > this problem even apply on Windows?
> >
> > Thanks.
> >
> > --
> > Sincerely,
> >
> > Jazzman (a.k.a. Justin Hickey) e-mail: jhickey@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@geog.uni-hannover.de with
> > subject 'unsubscribe grass5'
>
> --
> Andreas Lange, 65187 Wiesbaden, Germany, Tel. +49 611 807850
> Andreas.Lange@Rhein-Main.de - A.C.Lange@GMX.net
>

--
Andreas Lange, 65187 Wiesbaden, Germany, Tel. +49 611 807850
Andreas.Lange@Rhein-Main.de - A.C.Lange@GMX.net

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

Hi,

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.

I think that this has the problem that it must be implemented somehow
with the install script too, as re-compiling should be (at least for
linux) the exeption, not the standard.

On WinXX systems, The tcl-restart hack doesn't work anyway,
and you have to either type "wish /path/to/tcltkgrass", or
even better, create a tcltkgrass.bat file that does the same
thing, i.e. "wish /path/to/tcltkgrass %1 %2 %3 %4 ... %9".

If there is an running X server and a tk shell the tcltkgrass startup
could be make working for windows too.

This way, the user can update their wish, and grass doesn't
necessarily rely on a particular version of wish, just a link
from (or copy in) $GISBASE/bin/grasswish to the "real" wish.

This may cause problems for people who have no root access to the
machine they want to install grass on.

I don't know, i think it should be up to Justin and/or Markus to decide
how it should be done.

cu,

Andreas

--
Andreas Lange, 65187 Wiesbaden, Germany, Tel. +49 611 807850
Andreas.Lange@Rhein-Main.de - A.C.Lange@GMX.net

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

Justin Hickey wrote:

Hi Markus

Markus Neteler wrote:
> > If the problem is that $(UNIX_BIN) is being defined as the same as
> > $GISBASE, then the problem is in configure, not the Gmakefile. If we
> > can't get a reasonable default for bindir in configure (either
> > /usr/local/bin - what it should be or /usr/bin - I disagree with
> > this but if that's the only way ok) then we will have to tell users
> > to use the --with-bindir option to configure.
>
> Hi Justin,
> I don't fully get what you dislike, is it that I prefer "grass5" to
> be stored outside of $GISBASE?
>
> From the Linux view I would prefer this way:
> The average linux user who has a compile should be able to run:
>
> configure # without annoying extra parameters
> make install
> grass5
>
> This startup script should go somewhere here:
> echo $PATH
> /home/neteler/bin:/usr/local/bin:/usr/bin:/usr/X11R6/bin:/bin:/usr/games/bin:/usr/games:/opt/gnome/bin:/opt/kde/bin:/usr/openwin/bin:.
>
> If you would have to copy it manually from $GISBASE/bin to
> /usr/[local/]bin,
> that's extra work... Perhaps you think the same?!

Yes we are thinking the same, I agree that grass5 should be in the path.
Perhaps the confusion is on my part. I was under the impression that you
thought that since grass5 is put into $GISBASE/bin by default that it
was a problem with the initialization script placing the grass5 script
in that directory. I'm sorry if this was the case. It is actually a
configure problem because in configure, the bindir was not defined
properly and was defaulting to /usr/local/grass5/bin thus the
$(UNIX_BIN) variable in the src/general/init/Gmakefile becomes
/usr/local/grass5/bin. My fix I found yesterday, (and will be committed
soon) solves this problem.

My disagreement with /usr/bin comes from system administration. Software
(or executables) should not be installed under /usr/bin since it
contains vendor supplied programs. The only changes I make under
/usr/bin is to create links to executables that replace programs in
/usr/bin. For example, I install the latest Tcl/Tk under /usr/local. I
need to create a link /usr/bin/wish so that scripts that begin with

#!/usr/bin/wish

will use the new wish command. Anyway, all non-vendor installed software
should go under /usr/local/bin not /usr/bin. At least that was what I
was taught about system administration.

We need to know that, on all SVR4 systems such as HP-UX 10 and 11, all
non OS software should be installed under /opt/. So, Grass would be
in /opt/grass/bin/ and appropriate directories under /opt/grass/.
System admin is simplified because everything is under one directory.

I will test the new configure under HP-UX when I will have time (in two
weeks).

Are we still not understanding each other? :slight_smile:

--
Sincerely,

Jazzman (a.k.a. Justin Hickey) e-mail: jhickey@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@geog.uni-hannover.de with
subject 'unsubscribe grass5'

--
Robert Lagacé, professeur
Pavillon Comtois
Université Laval
Ste-Foy, Québec, G1K 7P4
tel : (418)-656-2131#2276
Fax : (418)-656-3723
E-mail : lagace@grr.ulaval.ca

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

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@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@geog.uni-hannover.de with
subject 'unsubscribe grass5'

Hi Markus

Markus Neteler wrote:

I wasn't aware that "wish" is a standard link.

Actually it is only recommended in the install instructions to create
the link. However, not creating the link can cause headaches for most
sysadmins when users download Tcl/Tk scripts that have the code snippet
below and of course, they fail. Therefore, I think it is a sort of
defacto standard that the links be created.

#!/bin/sh
# the next line restarts using wish \
exec wish "$0" "$@"

--
Sincerely,

Jazzman (a.k.a. Justin Hickey) e-mail: jhickey@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@geog.uni-hannover.de with
subject 'unsubscribe grass5'

Hi Robert

Robert Lagacé wrote:

We need to know that, on all SVR4 systems such as HP-UX 10 and 11, all
non OS software should be installed under /opt/. So, Grass would be
in /opt/grass/bin/ and appropriate directories under /opt/grass/.
System admin is simplified because everything is under one directory.

I will test the new configure under HP-UX when I will have time (in
two weeks).

Hmm. Another "standard" local program install directory. Arrrgh. Well,
the only thing I can think of is that we use some way in configure.in to
detect HP-UX. What is the output of "uname -s" for HP's? If we can't get
it installed in /opt by default, then you will have to use the --prefix
and --bindir options for configure.

By the way, what is the bin directory that appears in user's PATH's,
/opt/bin/?

Thanks in advance for the test!!

PS Cheers to a fellow Canadian! :slight_smile:

--
Sincerely,

Jazzman (a.k.a. Justin Hickey) e-mail: jhickey@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@geog.uni-hannover.de with
subject 'unsubscribe grass5'

Justin Hickey wrote:

Hi Robert

Robert Lagacé wrote:
> We need to know that, on all SVR4 systems such as HP-UX 10 and 11, all
> non OS software should be installed under /opt/. So, Grass would be
> in /opt/grass/bin/ and appropriate directories under /opt/grass/.
> System admin is simplified because everything is under one directory.
>
> I will test the new configure under HP-UX when I will have time (in
> two weeks).

Hmm. Another "standard" local program install directory. Arrrgh. Well,
the only thing I can think of is that we use some way in configure.in to
detect HP-UX. What is the output of "uname -s" for HP's? If we can't get
it installed in /opt by default, then you will have to use the --prefix
and --bindir options for configure.

The output of uname -s is HP-UX.

I think that the last version of Solaris use this standard also and all
SVR4 compliant OS.

By the way, what is the bin directory that appears in user's PATH's,
/opt/bin/?

With a well configure application, the /opt/application/bin directory is
added to the user search path. This solve a lot of admin problems.

Thanks in advance for the test!!

PS Cheers to a fellow Canadian! :slight_smile:

--
Sincerely,

Jazzman (a.k.a. Justin Hickey) e-mail: jhickey@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@geog.uni-hannover.de with
subject 'unsubscribe grass5'

--
Robert Lagacé, professeur
Pavillon Comtois
Université Laval
Ste-Foy, Québec, G1K 7P4
tel : (418)-656-2131#2276
Fax : (418)-656-3723
E-mail : lagace@grr.ulaval.ca

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

On Thu, Nov 30, 2000 at 04:03:18PM +0700, Justin Hickey wrote:

Hi Robert

Robert Lagacé wrote:
> We need to know that, on all SVR4 systems such as HP-UX 10 and 11, all
> non OS software should be installed under /opt/. So, Grass would be
> in /opt/grass/bin/ and appropriate directories under /opt/grass/.
> System admin is simplified because everything is under one directory.
>
> I will test the new configure under HP-UX when I will have time (in
> two weeks).

Hmm. Another "standard" local program install directory. Arrrgh. Well,
the only thing I can think of is that we use some way in configure.in to
detect HP-UX. What is the output of "uname -s" for HP's? If we can't get
it installed in /opt by default, then you will have to use the --prefix
and --bindir options for configure.

By the way, what is the bin directory that appears in user's PATH's,
/opt/bin/?

Thanks in advance for the test!!

I'd advocate against worrying about this. This is what the --prefix=
directive to configure is for. Same with --bindir.

--
Eric G. Miller <egm2@jps.net>

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

"Eric G . Miller" wrote:

On Thu, Nov 30, 2000 at 04:03:18PM +0700, Justin Hickey wrote:
> Hi Robert
>
> Robert Lagacé wrote:
> > We need to know that, on all SVR4 systems such as HP-UX 10 and 11, all
> > non OS software should be installed under /opt/. So, Grass would be
> > in /opt/grass/bin/ and appropriate directories under /opt/grass/.
> > System admin is simplified because everything is under one directory.
> >
> > I will test the new configure under HP-UX when I will have time (in
> > two weeks).
>
> Hmm. Another "standard" local program install directory. Arrrgh. Well,
> the only thing I can think of is that we use some way in configure.in to
> detect HP-UX. What is the output of "uname -s" for HP's? If we can't get
> it installed in /opt by default, then you will have to use the --prefix
> and --bindir options for configure.
>
> By the way, what is the bin directory that appears in user's PATH's,
> /opt/bin/?
>
> Thanks in advance for the test!!

I'd advocate against worrying about this. This is what the --prefix=
directive to configure is for. Same with --bindir.

I agree.

--
Eric G. Miller <egm2@jps.net>

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

--
Robert Lagacé, professeur
Pavillon Comtois
Université Laval
Ste-Foy, Québec, G1K 7P4
tel : (418)-656-2131#2276
Fax : (418)-656-3723
E-mail : lagace@grr.ulaval.ca

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

Perhaps during configure, there could be an option for non-standard,
possibly not in the current path wishes:
  --with-wish-shell=/opt/tcl/bin/wishX.X

By far the easiest way to do this is to assume that somewhere in the
current path is a wish interpreter. As soon as you start searching
"standard" directories, you run into the problem of non-standard
directories. The "wish" link is part of the standard "make install"
with every version of tcl/tk i've installed (7.5/4.1 to recent).
By assuming that the wish interpreter is in the current path, it's
fairly easy for the user to pick which interpreter is used by putting
it in the beginning of their path. Until someone can drive grass
strictly via the menus (close but not quite there yet), asking them
to modify their path is not, IMHO, an unreasonable request

This solution smells distinctly like using a sledgehammer to a
hang a picture.

Robert Lagacé wrote:

"Eric G . Miller" wrote:
>
> On Thu, Nov 30, 2000 at 04:03:18PM +0700, Justin Hickey wrote:
> > Hi Robert
> >
> > Robert Lagacé wrote:
> > > We need to know that, on all SVR4 systems such as HP-UX 10 and 11, all
> > > non OS software should be installed under /opt/. So, Grass would be
> > > in /opt/grass/bin/ and appropriate directories under /opt/grass/.
> > > System admin is simplified because everything is under one directory.
> > >
> > > I will test the new configure under HP-UX when I will have time (in
> > > two weeks).
> >
> > Hmm. Another "standard" local program install directory. Arrrgh. Well,
> > the only thing I can think of is that we use some way in configure.in to
> > detect HP-UX. What is the output of "uname -s" for HP's? If we can't get
> > it installed in /opt by default, then you will have to use the --prefix
> > and --bindir options for configure.
> >
> > By the way, what is the bin directory that appears in user's PATH's,
> > /opt/bin/?
> >
> > Thanks in advance for the test!!
>
> I'd advocate against worrying about this. This is what the --prefix=
> directive to configure is for. Same with --bindir.

I agree.

--
+=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=+
| Eric B. Mitchell mailto:emitchell@altaira.com |
| tel: (301) 809 - 3534 Altair Aerospace Corporation |
| tel: (800) 7 - ALTAIR 4201 Northview Dr. Suite 410 |
| fax: (301) 805 - 8122 Bowie, MD 20716 |
+=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=+
              ,___
          /"\ / o=\ /"""---===/
         / \_/ \__/ ---===/
         | //\ || /""TT""/ //\ || ||""\
         | // \ || || // \ || ||__/
         | //--==\ |L--/ || //--==\ || || "=,
          \ ---===/
           \____---===/

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

Hi all,

the wish search is reduced to find the path only.
Only "wish" is supported without version number.

So I have simplified the startup of tcltkgrass (as proposed by Andreas).
Please clean the tcltkgrass stuff from GISBASE before proceeding.
Then
cvs update src/tcltkgrass
gmake5 src/tcltkgrass

Additionally I have simplified the grass5 startup (taken out the complex
wish search as well) and changed to reflect the changes for
startup of tcltkgrass.
cvs update src/general/init
gmake5 src/general/init

Please test the updated environment. The windows related checks etc.
will be done by Justin (hope so).

Hope the change is o.k. for all,

Markus

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

Andreas Lange wrote:

Hi,

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.

I think that this has the problem that it must be implemented somehow
with the install script too, as re-compiling should be (at least for
linux) the exeption, not the standard.

As long as all of grass's Tcl/Tk scripts reference "grasswish"
in their restart-in-wish line, you'd just have to change which
wish is referenced by the symbolic link. You wouldn't have to
recompile any code, unless tcltkgrass depends on a custom Tcl
interpreter, but that would require a recompile to use a
different Tcl interpreter anyway.

> This way, the user can update their wish, and grass doesn't
> necessarily rely on a particular version of wish, just a link
> from (or copy in) $GISBASE/bin/grasswish to the "real" wish.

This may cause problems for people who have no root access to the
machine they want to install grass on.

No more of a problem than trying to install grass itself. They
could install it under their home directory, assuming they have
the space. Which means they could always overwrite it if they
need to. You could even have your own grasswish link/executable
in your PATH before the grass-installed one. (e.g. ~/bin).

I don't know, i think it should be up to Justin and/or Markus to decide
how it should be done.

Agreed, I'm just throwing ideas out there. My company's main
product where I work does a lot with Tcl/Tk and custom wish
interpreters, so I was offering some of the ideas we've tried
that might work for grass.

cu,

Andreas

-- ebm
+=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=+
| Eric B. Mitchell mailto:emitchell@altaira.com |
| tel: (301) 809 - 3534 Altair Aerospace Corporation |
| tel: (800) 7 - ALTAIR 4201 Northview Dr. Suite 410 |
| fax: (301) 805 - 8122 Bowie, MD 20716 |
+=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=+
              ,___
          /"\ / o=\ /"""---===/
         / \_/ \__/ ---===/
         | //\ || /""TT""/ //\ || ||""\
         | // \ || || // \ || ||__/
         | //--==\ |L--/ || //--==\ || || "=,
          \ ---===/
           \____---===/

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

Eric Mitchell wrote:

Andreas Lange wrote:
>
> Hi,
>
> 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.
>
> I think that this has the problem that it must be implemented
> somehow with the install script too, as re-compiling should be (at
> least for linux) the exeption, not the standard.

As long as all of grass's Tcl/Tk scripts reference "grasswish"
in their restart-in-wish line, you'd just have to change which
wish is referenced by the symbolic link. You wouldn't have to
recompile any code, unless tcltkgrass depends on a custom Tcl
interpreter, but that would require a recompile to use a
different Tcl interpreter anyway.

> > This way, the user can update their wish, and grass doesn't
> > necessarily rely on a particular version of wish, just a link
> > from (or copy in) $GISBASE/bin/grasswish to the "real" wish.
>
> This may cause problems for people who have no root access to the
> machine they want to install grass on.

No more of a problem than trying to install grass itself. They
could install it under their home directory, assuming they have
the space. Which means they could always overwrite it if they
need to. You could even have your own grasswish link/executable
in your PATH before the grass-installed one. (e.g. ~/bin).

Thank you very much for your suggestion Eric, but in this case I think
we should keep things as simple as possible. Therefore, I will just
search for wish in the users path. I think this is a reasonable
assumption since many Tcl/Tk scripts either have something like
#!/usr/bin/wish or the "next line restarts with wish" trick, thus
sysadmins would have to create the appropriate link for other software
as well. If wish is not in the user's path I plan to print an
appropriate message.

> I don't know, i think it should be up to Justin and/or Markus to
> decide how it should be done.

Agreed, I'm just throwing ideas out there. My company's main
product where I work does a lot with Tcl/Tk and custom wish
interpreters, so I was offering some of the ideas we've tried
that might work for grass.

Please continue throwing your ideas our way, in fact I may be in touch
with you concerning custom wish interpreters in the future if you
wouldn't mind. I am considering using one for the "real" new
initialization work, but haven't quite decided yet. However, it will be
a little while before I get to that point. I'll let you know.

--
Sincerely,

Jazzman (a.k.a. Justin Hickey) e-mail: jhickey@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@geog.uni-hannover.de with
subject 'unsubscribe grass5'