[GRASS-dev] Re: Issue with gnome-terminal [Re: Fwd: [GRASS-user] Page 37 "Open Source GIS" by Neteler & Mitasova]

Glynn Clements glynn at gclements.plus.com
Sat Feb 2 08:45:47 EST 2008


Moritz Lennert wrote:

> > Thanks for the quick reply. 
> > When I make the entries you suggest I get the following in an 
> > Application Error box:
> > /usr/bin/x-terminal-emulator: to set an icon, please use -name <profile> 
> > and set a profile icon
> > /usr/bin/x-terminal-emulator: to set an icon, please use -name <profile> 
> > and set a profile icon
> >     while executing
> > "exec -- $env(GISBASE)/etc/grass-xterm-wrapper -T g.proj -n g.proj -e 
> 
> This is probably an issue with gnome-terminal which does not take the 
> same command line arguments as xterm. Try setting GRASS_XTERM to xterm.
> 
> This does raise an issue about which command line arguments we can use 
> for grass-xterm-wrapper. Is there a general standard ?

You can rely upon -e being supported and behaving as for xterm, and
any other options which xterm understands either behaving as for xterm
or being silently ignored. If you want to use any other terminal
emulator, you must use a wrapper which provides a minimum level of
xterm compatibility.

Note that you can achieve compatibility by simply stripping out all
arguments up to the first occurence of "-e", e.g.:

	while [ "$1" != "-e" ] ; do shift ; done

Oh, and I've just noticed that the Terminal.app changes completely
broke grass-xterm-wrapper. If you set GRASS_XTERM to something which
doesn't end in "xterm", it won't work. So, I've reverted the changes.

If you want to use Terminal.app as an xterm replacement, obtain a
previous version of grass-xterm-wrapper with e.g.:

	svn cat -r 21084 lib/init/grass-xterm-wrapper > terminal.sh

Remove everything except the Terminal.app parts, save the script, then
set GRASS_XTERM to point at the script. That's what
grass-xterm-wrapper is for: to *spawn* a program specified by
$GRASS_XTERM, not to *be* that program.

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


More information about the grass-dev mailing list