[R] using Rterm under cygwin, no possiblity to delete characters

Dewez Thomas t.dewez at brgm.fr
Fri Jul 30 15:43:58 CEST 2004


Dear all again,

Here is a wrap-up of the fact finding mission Roger and I led over the last
two days (see his reply below my email).

The issue was the following:
---------------------------
1. Rterm breaks down when invoked from Xwindow under Cygwin. This is a
typical Cygwin problem and does not seem to occur on other Unix/Linux
systems.

2. Rterm breaking down in Xwindow had implications for using the R/GRASS
interface. R/GRASS would die as soon as an unrecognized function was
entered.

Solution
--------
1. To execute Rterm in the Cygwin environment, use a terminal window (bash
in my case) directly under windows and NOT in an Xwindow environment.
Running Rterm under Xwindow is the cause of the problem.



2. For subsequent questions concerning R/Grass interface. I sucessfully
managed to run Rterm within GRASS in the following manner:
1. Start an Xwindow session
2. Back in Windows, start a bash terminal window (the bright green and black
icon)
3. Start GRASS in this new bash window (see below for setting this up
correctly)
4. Inside GRASS start Rterm (type just Rterm at the prompt)

If you call the help and graphics functions of R, new R windows will pop up
in Windows, and if you want graphics display for GRASS (e.g. d.mon start=x0;
d.rast myGISlayer), they will appear in the Xwindow session. This is a
hybrid system but it seems to work.

To make sure that GRASS runs inside the bash terminal window, alter the
GRASS_GUI setting of the file .grassrc57 (it is to be found in the directory
that cygwin recognises as your home). In .grassrc57, there is a setting
called GRASS_GUI and usually set to tcltk
GRASS_GUI: tcltk
The option we want is "text" instead of "tcltk"
With this setting you will be able to operate GRASS with command lines in
the bash terminal and see graphics output displayed in the Xwindow session.

By the way, invoking Grass in the terminal also seems to work in GRASS57. I
didn't do anything else than install the precompiled binaries for Windows
following the recommended procedure.

Inside the R/GRASS interface, I stumbled on other problems (concerning
gmeta() command failing to find mapsets). I still need to figure this out.

More later and thank you very much for the brilliant help!

Thomas




> -----Message d'origine-----
> De: Roger Bivand [mailto:Roger.Bivand at nhh.no]
> Date: vendredi 30 juillet 2004 13:26
> À: Dewez Thomas
> Objet: RE: [R] using Rterm under cygwin, no possiblity to delete
> characters
> 
> 
> Thomas,
> 
> Yes and no. I'm refering to 
> 
> http://grass.itc.it/grass50/binary/windows_cygnus/wingrass_generic/
> 
> which appears to have stopped at 5.0.2. Subsequent Cygwin 
> compiles: 5.0.3, 
> 5.3, and 5.7 all require an X-server for the d.* commands. 
> The question is 
> whether you can run the GRASS programs that do not need a 
> running X-server 
> under Cygwin under straight Windows (Cygwin bash running in a Windows 
> command line window, I think). I also think Peter Dalgaard is 
> right that 
> Rterm expects to be used as batch, rather than interactively, 
> and will 
> then halt at errors (although I have run it interactively 
> from a Windows 
> command line window and within Cygwin bash). I think you will make 
> progress if you can avoid all graphics (X11) in using the R/GRASS 
> interface, and not using an X11 windows manager, just 
> straight Windows.
> 
> It would be useful to document this, as other people are 
> likely to run 
> into this trying to run the interface on 5.7 under Cygwin.
> 
> Best wishes,
> 
> Roger
> 
> On Fri, 30 Jul 2004, Dewez Thomas wrote:
> 
> > Roger,
> > 
> > Not sure to understand you statement
> > > Rterm will run for the 
> > > Generic GRASS Cygwin version (I have tried with GRASS 5.0.2), but 
> > > not pretending to do X11 under Cygwin. 
> > 
> > This may be the solution, but how does one run Generic 
> GRASS cygwin? Can you
> > call display procedures with commands like: d.mon start=x0 
> ; d.his h_map=dem
> > i_map=slope? I am confused about this and always assumed 
> that Grass needed
> > to be inside an Xwindow session to use graphics displays.
> > 
> > Your suggestion will probably save my day if you could just 
> precise it a
> > little. Thanks!
> > 
> > Thomas
> > ***
> > Le contenu de cet e-mail et de ses pièces jointes est 
> destiné à l'usage exclusif du 
> > (des) destinataire(s) expressément désigné(s) comme tel(s). 
> En cas de réception de cet 
> >  e-mail par erreur, le signaler à son expéditeur et ne pas 
> en divulguer le contenu. 
> > L'absence de virus a été vérifié à  l'émission du message. 
> Il convient néanmoins de 
> > vérifier l'absence de corruption à sa réception.
> > 
> > The contents of this email and any attachments are 
> confidential. They are intended for 
> > the named recipient(s) only. If you have received this 
> email in error please notify the 
> > system manager or  the sender immediately and do not 
> disclose the contents to 
> > anyone or make copies. eSafe scanned this email for 
> viruses, vandals and malicious 
> > content.
> > ***
> > 
> 
> -- 
> Roger Bivand
> Economic Geography Section, Department of Economics, 
> Norwegian School of
> Economics and Business Administration, Breiviksveien 40, 
> N-5045 Bergen,
> Norway. voice: +47 55 95 93 55; fax +47 55 95 93 93
> e-mail: Roger.Bivand at nhh.no
> 
> 
***
Le contenu de cet e-mail et de ses pièces jointes est destiné à l'usage exclusif du 
(des) destinataire(s) expressément désigné(s) comme tel(s). En cas de réception de cet 
 e-mail par erreur, le signaler à son expéditeur et ne pas en divulguer le contenu. 
L'absence de virus a été vérifié à  l'émission du message. Il convient néanmoins de 
vérifier l'absence de corruption à sa réception.

The contents of this email and any attachments are confidential. They are intended for 
the named recipient(s) only. If you have received this email in error please notify the 
system manager or  the sender immediately and do not disclose the contents to 
anyone or make copies. eSafe scanned this email for viruses, vandals and malicious 
content.
***




More information about the R-help mailing list