[GRASS5] New help button - please text review
Markus Neteler
neteler at itc.it
Tue Feb 1 12:57:09 EST 2005
On Tue, Feb 01, 2005 at 11:45:19AM -0500, John Gillette wrote:
> xmessage -center -file - any_file.txt
> at a terminal reproduces your error message.
> Do you need the final dash (-) in the GRASS_PAGER variable?
> In other words:
> setenv GRASS_PAGER "xmessage -center -file"
Magic! This works
if $TERM is csh like
setenv GRASS_PAGER "xmessage -center -file"
if $TERM is bash like
export GRASS_PAGER="xmessage -center -file"
Thanks, John!
This should be documented somewhere in the online
help system.
Markus
> > -----Original Message-----
> > From: grass5-admin at grass.itc.it [mailto:grass5-admin at grass.itc.it]On
> > Behalf Of Markus Neteler
> > Sent: Monday, January 31, 2005 6:11 AM
> > To: Hamish
> > Cc: grass5 developers list
> > Subject: Re: [GRASS5] New help button - please text review
> >
> >
> > Hamish,
> >
> > On Mon, Jan 24, 2005 at 08:14:39PM +1300, Hamish wrote:
> > ...
> > > idea: use xmessage (should be installed on all Mac+Cygwin with X?)
> > >
> > >
> > > if GUI:
> > >
> > > if $TERM is csh like
> > > setenv GRASS_PAGER "xmessage -center -file -"
> > >
> > > if $TERM is bash like
> > > export GRASS_PAGER="xmessage -center -file -"
> >
> > I tried this idea, works well for g.list etc.
> >
> > However, it doesn't with g.setproj:
> >
> > GRASS 6.0.cvs:~ > g.setproj
> >
> > WARNING! A projection file already exists for this location
> > (Filename '/ssi0/ssi/neteler/grassdata/srilanka/PERMANENT/PROJ_INFO')
> > ...
> > Please specify projection name
> > Enter 'list' for the list of available projections
> > Hit RETURN to cancel request
> > >list
> > usage: xmessage [-options] [message ...]
> >
> > where options include:
> > -file filename file to read message from,
> > "-" for stdin
> > -buttons string comma-separated list of label:exitcode
> >
> >
> > The code in lib/gis/get_projname.c is
> >
> > do {
> > fprintf(stderr,_("\n\nPlease specify projection
> > name\n"));
> > fprintf(stderr,_("Enter 'list' for the list of
> > available projections\n"));
> > fprintf (stderr, _("Hit RETURN to cancel request\n"));
> > fprintf(stderr,">");
> > } while(!G_gets(answer));
> >
> > G_strip(answer);
> > if(strlen(answer)==0) return -1;
> > if (strcmp(answer,"list") == 0) {
> > if (isatty(1)) {
> > sprintf(buff,"$GRASS_PAGER %s",Tmp_file);
> > }
> > else
> > sprintf(buff,"cat %s",Tmp_file);
> > system(buff);
> > }
> >
> > Is it the isatty?
> >
> > Markus
> >
> > _______________________________________________
> > grass5 mailing list
> > grass5 at grass.itc.it
> > http://grass.itc.it/mailman/listinfo/grass5
> >
--
Markus Neteler <neteler itc it> http://mpa.itc.it
ITC-irst - Centro per la Ricerca Scientifica e Tecnologica
MPBA - Predictive Models for Biol. & Environ. Data Analysis
Via Sommarive, 18 - 38050 Povo (Trento), Italy
More information about the grass-dev
mailing list