[GRASS5] tcltkgrass and wish error

Eric G. Miller egm2 at jps.net
Mon Aug 26 21:58:13 EDT 2002


On Tue, Aug 27, 2002 at 12:43:31AM +0100, Glynn Clements wrote:
> 
> Markus Neteler wrote:
> 
> > since we get the tcltkgrass/wish questions too often,
> > I suggest a change to tcltkgrass startup:
> > 
> > mv $GISBASE/bin/tcltkgrass $GISBASE/etc/tcltkgrass.start
> > 
> > new file $GISBASE/bin/tcltkgrass with contents:
> > #!/bin/sh
> > # the next line restarts using wish \
> > if [ "`type -p $GRASS_WISH`" = "" ] ; then
> >  echo "wish not found. Install tcl and tk libraries."
> >  exit
> > else
> >  exec $GISBASE/etc/tcltkgrass.start
> > fi
> > 
> > Are there any objections (certainly above message may be modified)?
> 
> I doubt that this will achieve anything, other than a different error
> message following the "I get the following error" messages.
> 
> Even people who have installed Tcl/Tk will still get errors if wish is
> installed as e.g. "wish8.3".

It is a bug though currently.

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

If $GRASS_WISH is not defined, the script goes into an endless loop.

#! /bin/sh
# Wish upon a star \
if test -n "$GRASS_WISH"; then \
  exec $GRASS_WISH "$0" "$@"; \
else \
  echo "TCLTKGRASS must be run from the GRASS shell"; \
  exit 1; \
fi

...

Seems to work... The "\" continuations seem to be necessary for
wish.

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




More information about the grass-dev mailing list