From p.dalgaard at biostat.ku.dk  Wed Jun  9 14:01:29 2004
From: p.dalgaard at biostat.ku.dk (Peter Dalgaard)
Date: Wed Jun  9 14:08:27 2004
Subject: [Rd] Re: 1.9.1-alpha & tty
In-Reply-To: <Pine.LNX.4.44.0406091233300.22827-100000@gannet.stats>
References: <Pine.LNX.4.44.0406091233300.22827-100000@gannet.stats>
Message-ID: <x2ekopj5ye.fsf@biostat.ku.dk>

Prof Brian Ripley <ripley@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@biostat.ku.dk)             FAX: (+45) 35327907


[Rd] Re: 1.9.1-alpha & tty
Peter Dalgaard