[GRASS-dev] New xterm wrapper not working on Mac build

Glynn Clements glynn at gclements.plus.com
Mon Sep 4 23:11:36 EDT 2006


Michael Barton wrote:

> I just discovered that the xterm wrapper script does not work for Willaim
> Kyngesburye¹s framework build binaries for the Mac, and won¹t work for
> Lorenzo¹s binaries either in some circumstances.
> 
> The issue is that the Mac BASH terminal is used as the GRASS terminal rather
> than an xterm. The Mac terminal is much easier to use. But when
> grass-xterm-wrapper.sh is run from the BASH terminal, it doesn¹t realize
> that x is running and returns a command not found error. This is not a
> problem when an xterm is launched from TclTk, which IS running in X-windows.
> 
> Solutions?

	export PATH=$PATH:/usr/X11R6/bin
	export DISPLAY=:0

Or set GRASS_XTERM to a command which will work as a substitute for
xterm. BUT ...

William Kyngesburye wrote:

> Hmm, when I saw the xterm wrapper thread, I kinda wondered how it  
> might affect GRASS running from a Mac Terminal.  I'm not sure about  
> the details on how the wrapper is used, but when an xterm is needed,  
> would a Mac Terminal work?

Any xterm substitute will need to accept whatever options and switches
are used by commands which were originally written for an xterm.

It's free to ignore them, but it has to figure out that the command is
whatever follows the -e switch. E.g.

	#!/bin/sh
	while true ; do
		if [ "$1" = -e ] ; then break ; fi
		shift
	done
	shift
	exec someotherterminal "$@"

Also, be careful about quoting; some of the commands use -title with
an argument which contains spaces.

-- 
Glynn Clements <glynn at gclements.plus.com>




More information about the grass-dev mailing list