[Rd] Re: 1.9.1-alpha & tty

Peter Dalgaard p.dalgaard at biostat.ku.dk
Wed Jun 9 14:01:29 CEST 2004


Prof Brian Ripley <ripley at stats.ox.ac.uk> writes:

> On Wed, 9 Jun 2004, Göran Broström wrote:
> 
> > On Wed, Jun 09, 2004 at 01:23:49PM +0200, Göran Broström wrote:
> > > I have two versions of R on my Debian testing: R-1.9.0 (precompiled) and
> > > R-1.9.1-alpha of 2004-06-07 (built on my system). In the latter, I get
> > > 
> > > > system("emacs sim.R &")
> > > > emacs: standard input is not a tty
> > > 
> > > while with R-1.9.0 it works as expected. I have absolutely no idea about
> > > what's going on, so I could use some help. Anyone?
> > 
> > I just recalled that I was running R-1.9.1 as root ("su -; R") in order to
> > be able to 'install.packages'. That must be the reason, but I still don't
> > understand what it means.
> 
> It means the shell you are running it from is not an interactive shell
> connected to a terminal, which is true as it is launched from R.  You are
> trying to run a detached session with '&': that does not work for me in
> 1.9.0 without su -.
> 
> > system("emacs &")
> > emacs: standard input is not a tty
> 
> as I would expect.

It's probably a matter of whether DISPLAY is set:

>  system("emacs sim.R &") # works
>  system("DISPLAY= emacs sim.R &")
> emacs: standard input is not a tty

(Redhat 8)

"su -" will usually not set DISPLAY since root might not have
credentials to write to the display (which might be on a completely
unrelated system). 
-- 
   O__  ---- Peter Dalgaard             Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics     2200 Cph. N   
 (*) \(*) -- University of Copenhagen   Denmark      Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk)             FAX: (+45) 35327907



More information about the R-devel mailing list