[R] X11 is not availble

Barry Rowlingson b.rowlingson at lancaster.ac.uk
Thu Dec 18 13:54:51 CET 2008

2008/12/18 Dennis Schmidt <Dennis.Schmidt at student.hpi.uni-potsdam.de>:
> No, haven't seen this so far. But it quite looks like what I'm looking for,
> so thanks a lot :-)

 The png() device does not need an X server to connect to. I think it
used to in versions gone by, but not any more. Here I've disabled X so
that X11() doesn't work, but png() still does:

 > x11()
 Error in X11(d$display, d$width, d$height, d$pointsize, d$gamma,
d$colortype,  :
   unable to start device X11cairo
 In addition: Warning message:
 In x11() : unable to open connection to X11 display ''
 > png(file="foo2.png")
 > plot(1:10)
 > dev.off()
 null device

 I suspect your R was compiled without png support. What does the
'capabilities()' function in R tell you?

 > capabilities()
    jpeg      png     tiff    tcltk      X11     aqua http/ftp  sockets
    TRUE     TRUE     TRUE     TRUE    FALSE    FALSE     TRUE     TRUE
  libxml     fifo   cledit    iconv      NLS  profmem    cairo
    TRUE     TRUE     TRUE     TRUE     TRUE     TRUE     TRUE

- I've got png capability - have you? If not, you need to recompile
and find out why. When you run configure it should tell you what
capabilities it has figured out for itself. To get png support you'll
need the png-devel library and header files.

 Anything else is speculation until we see capabilities()....


More information about the R-help mailing list