[GRASSLIST:4158] Re: problem with list in cygwin....

Glynn Clements glynn.clements at virgin.net
Thu Jul 25 20:52:21 EDT 2002


Jeff D. Hamann wrote:

> when I try to use list in cygwin (on one machine anyway...) I get the
> following messages no matter what drive, who I am logged on as, etc...
> 
> 
> Please specify projection name
> Enter 'list' for the list of available projections
> Hit RETURN to cancel request
> >list
> /usr/home/hamannj/grassdata/jackson-stp/PERMANENT/.tmp/JACKSON/3468.0: No
> such file or directory
> 
> 
> Please specify projection name
> Enter 'list' for the list of available projections
> Hit RETURN to cancel request
> >
> 
> 
> I have another machine (win2k in both cases running grass5pre3) where this
> works just fine.... what could be causing this to happen?

The code in question is:

          if (strcmp(answer,"list") == 0) {
            if (isatty(1)) {
	      sprintf(buff,"$GRASS_PAGER %s",Tmp_file);
            }
            else
	      sprintf(buff,"cat %s",Tmp_file);
            system(buff);
          }

Tmp_file is the name of a file which should have been created by
G_tempfile(). This function creates temporary files using the pattern:

	<gisdbase>/<location>/<mapset>/.tmp/<hostname>/<pid>.<count>

First, check whether the file in question exists. The file will be
deleted when the projection request is completed or aborted, so you
need to look for it while at the second "Enter list ..." prompt.

If the file exists, then there would seem to be a problem with the
program which is specified by the environment variable GRASS_PAGER. 
This defaults to "more" if /bin/more exists and is executable, and
"less" otherwise.

If the file doesn't exist, check whether any similar file exists.

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



More information about the grass-user mailing list