[GRASSLIST:4583] Re: Starting Grass 5 Pre4 on Mac OSX 10.2

Glynn Clements glynn.clements at virgin.net
Tue Sep 24 22:57:37 EDT 2002


Jason Horn wrote:

> after hitting return I get:
> 
> Error opening terminal: xterm.
> Invalid resource file, removing /Users/jt/.grassrc5
> 
> ... and then Grass quits
> 
> Does anyone know what's going on?

The message "Error opening terminal: xterm." indicates that the
"curses" library cannot find a terminal description for the terminal
type "xterm".

Basically, curses is used for creating "full screen" displays on a
text terminal. Programs which need to position text on the terminal
screen (as opposed to just printing text in a top-to-bottom,
left-to-right order) normally use this library. Several GRASS
programs, including the initialisation program, use curses.

In order to figure out how to perform operations such as positioning
the cursor, curses uses a database of "terminal descriptions". These
list the exact codes which need to be sent to a given type of terminal
to perform a particular operation.

There are two such database systems in common use. "termcap" normally
consists of a single file, typically /etc/termcap. "terminfo" consists
of a directory (on Unix systems, /usr/lib/terminfo and
/usr/share/terminfo are both common), with one file for each terminal
type. To avoid having too many files in one directory, the individual
files are split into subdirectories according to the first letter. 
E.g. on my Linux system, the terminfo description for "xterm" is in
the file /usr/share/terminfo/x/xterm.

Different versions or implementations of the curses library may use
one or other or both mechanisms. Older versions use termcap, newer
versions tend either to use terminfo, or to prefer terminfo but
support termcap if terminfo isn't available.

As for fixing the problem, the first thing to check is whether you
have all of the necessary files installed. If you have a terminfo
directory, and it contains an entry for "xterm", you may need to set
the environment variable TERMINFO, e.g.

	TERMINFO=/usr/share/terminfo
	export TERMINFO

If you don't seem to have a terminfo directory, you may need to
install an additional package. If you have the directory, but it
doesn't contain an entry for xterm, check whether there is an update.

One final note regarding GRASS on MacOSX. GRASS was written for, and
runs on, Unix and Unix-like systems. MacOSX is sufficiently Unix-like
that people have managed to compile and use GRASS on it. However, it
seems to have enough differences to cause a few problems.

Unfortunately, none of the main GRASS developers have MacOSX systems,
and most of the users who have MacOSX systems don't seem to be
particularly familiar with Unix. Consequently, ironing out the
problems with MacOSX has been proceeding rather slowly.

So, it would help if those people who are using GRASS on MacOSX could
contribute any experience of solving MacOSX-related problems. E.g. if
you find that you need to install a specific package, or enable a
specific option, please pass that information on to the list, where it
will be archived for the benefit of anyone else who subsequently has
similar problems.

-- 
Glynn Clements <glynn.clements at virgin.net>



More information about the grass-user mailing list