Missing X11 support in RStudio?

All my R builds have X11 support and that's visible from command-line when I run capabilities().
However when I try it from inside RStudio I shows X11 as False.
Any ideas why? Have I overlooked some configuration?

This is the same R, one inside RStudio and one inside an terminal.

I sort of figured this one out - we were having issues with plots not displaying and Workbench was giving an error like this which led us down the wrong X11 path:

Error in RStudioGD() : 
  Shadow graphics device error: r error 4 (Error in .External2(C_X11, paste0("png::", filename), g$width, g$height,  : 
  unable to start device PNG
In addition: Warning message:
In grDevices:::png("/tmp/RtmpIMcLPK/02e63049d20e46ad9346d8c6b34bd4e0.png",  :
  unable to open connection to X11 display ''

Turns out the solution is to set the Graphics Backend in the Global Options to Cairo or AGG, or set options(bitmapType="cairo") or similar in your ~.Rprofile.

1 Like

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.