[Rd] x11(....) kills R without DISPLAY (PR#10379)

From: <brechbuehler_at_gmail.com>
Date: Sat, 27 Oct 2007 00:30:05 +0200 (CEST)

Full_Name: Christian Brechbuehler
Version: 2.4.1, 2.5.1,
OS: Ubuntu GNU/Linux
Submission from: (NULL) (

'X11' starts a graphics device driver on the display given by argument 'display'.

If the environment variable DISPLAY is not set, the R process dies with exit status 1.

Example (start R without DISPLAY from bash):   % DISPLAY= R

  > x11("localhost:11.0")                        # this is my valid DISPLAY
  Error: Couldn't find per display information   %

This was reported before (e.g.,
https://stat.ethz.ch/pipermail/ess-help/2006-April/003464.html), but search turns up no R Bug Report.

Reportedly this problem was introduced between R 2.2.1 and R 2.3.0. The following versions are affected:

  R 2.4.1 (Patched), 2007-03-25, svn.rev 40917, x86_64-unknown-linux-gnu
  R 2.5.1 (Patched), 2007-09-16, svn.rev 43071, x86_64-unknown-linux-gnu 
  R 2.6.0 (Patched), 2007-10-16, svn.rev 43176, x86_64-unknown-linux-gnu 
  R 2.6.0 (Patched), 2007-10-25, svn.rev 43271, x86_64-unknown-linux-gnu 
  R 2.7.0 (Under development (unstable)), 2007-10-25, svn.rev 43273,

Further Observations:

(A) If DISPLAY is set but not a valid X11 server, R dies equally.

(B) If DISPLAY is set to an X11 server on which I don't have access, the x11 call fails as follows:
| Error in x11("localhost:11.0") :
| X11 fatal IO error: please save work and shut down R
| Enter a frame number, or 0 to exit
| 1: x11("localhost:11.0")
| Selection:

I.e., the R session survives. But it is not possible to start an X11 graphics device driver.

(C) If DISPLAY is set to an X11 server on which I have access, the x11 call succeeds, and it opens a window on the server named in the 'display' argument. Nothing happens on DISPLAY, which is appropriate.

My conjecture: R seems to first connect to the server given by the DISPLAY environment variable, performing no visible operations, before heeding the 'display' argument.

(D) It is possible to swich between X11 servers (a.k.a. displays) on the fly by using graphics.off() followed by x11(my.new.display).

When Googling, I found the error string "Couldn't find per display information" sometimes associated with the Xt library.

I'd be happy to answer any questions that may help clarify the issue.

R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Fri 26 Oct 2007 - 22:33:26 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Tue 30 Oct 2007 - 03:46:12 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-devel. Please read the posting guide before posting to the list.