[R-sig-Debian] ubuntu configuration problem "Couldnt get a file descriptior referring to the console"

Dirk Eddelbuettel edd at debian.org
Mon Jun 15 16:18:46 CEST 2009


Paul,

On 15 June 2009 at 08:49, Paul Johnson wrote:
| Greetings to everybody in r-sig-debian land.
| 
| I hope I have found the right place to ask this. If not, please refer me on...

No this is the right place. So welcome!
 
| I run R 2.9 on Ubuntu 9.04.  

That was 'a little underspecified'. "Whose R"? I.e. where did the binary come
from?  CRAN? Or from sources and you built it yourself?  What is the
architecture?

[ Ok, I figured it out comparing amd64 (at work) to i386 (at home). My
R-on-Ubuntu at home has the same problem. ]

| I believe many people have seen this
| problem, but because the error message is hard to understand, they
| have not traced it back to the R install in the distribution.  I think
| it ought to be fixed in the R packaging process, but I do not know if
| the problem begins with the Debian packaging or if someone at Ubuntu
| has caused it.
| 
| As far as I can see, any program that tries to spawn a pdf viewer
| fails with this somewhat uninformative error message:
| 
| > RShowDoc("frame", package="grid")
| > Couldnt get a file descriptor referring to the console
| 
| I've traced this back to  a setting in /etc/R/Renviron:
| 
| ## Default PDF viewer
| R_PDFVIEWER=${R_PDFVIEWER-'/bin/open'}

On my Ubuntu system at work (amd64, 2.9.0 binaries from CRAN using Vicent and
Michael's "Ubuntu re-builds" of my Debian packages) I have

$ grep -i pdf /etc/R/Renviron
R_PDFLATEXCMD=${R_PDFLATEXCMD-${PDFLATEX-'/usr/bin/pdflatex'}}
R_RD4PDF=${R_RD4PDF-'times,hyper'}
## Default PDF viewer
R_PDFVIEWER=${R_PDFVIEWER-'/usr/bin/xpdf'}
$

The '/usr/bin/xpdf' is actually an explicit setting, and we ensure xpdf is
present at built time.

On my Ubuntu system at home (i386, binaries from CRAN as well) I have the
same problem you diagnosed.  Now, I don;t use that machine much for R so I
never noticed...

This seems to be a genuine bug in the i386 CRAN builds, and I trust Vincent
and Michael will try to fix it.

| That setting causes the trouble--if it is changed to a valid pdf
| viewer, then the strange error message does not appear.  If your
| system has the OpenDesktop mime system in place, this setting will
| work:
| 
| # Default PDF viewer
| R_PDFVIEWER=${R_PDFVIEWER-'/usr/bin/xdg-open'}
| 
| I've also learned that within a session a pdf viewer can be set with options:
| 
| options(pdfviewer = "evince")

See help(Startup) -- you can also make that 'permanent' via the files in
either $(HOME) or below /etc/R/.

| Why does the existing configuration refer to /bin/open?  Can this be
| fixed by the packager so that users don't have to make this change?

We sure should try to fix it, esp as it comes from a pre-packaged binary.

Thanks,  Dirk


 
| Here is the post that says this is a debian-sig issue:
| http://www.nabble.com/Re:-unable-to-view-vignette-in-R-p20522903.html
| And I believe this problem has existed for a long time because:
| https://stat.ethz.ch/pipermail/r-help/2007-September/141178.html
| PJ
| 
| -- 
| Paul E. Johnson
| Professor, Political Science
| 1541 Lilac Lane, Room 504
| University of Kansas
| 
| _______________________________________________
| R-SIG-Debian mailing list
| R-SIG-Debian at r-project.org
| https://stat.ethz.ch/mailman/listinfo/r-sig-debian

-- 
Three out of two people have difficulties with fractions.



More information about the R-SIG-Debian mailing list