I am having some trouble getting plots to display in our RStudio Server interactive app. We are running this app without Singularity, in the same manner as described in this post. The R interpreter we use for this, we built from source, but I suspect I’m missing some libraries, or compiler flags, or both. When we try to run a plot in RStudio Server, we get this error:
Error in RStudioGD() : Shadow graphics device error: r error 4 (R code execution error) In addition: Warning message: In grDevices:::png("/tmp/RtmpHm70aN/206c218b33c34010a3a833ac7bc55509.png", : unable to open connection to X11 display ''
This makes sense, because in a browser window, we wouldn’t have an X11 display device. Some searching around on the internet suggests that we may be missing
libjpeg, and possibly some others. I have tried building these, and other libraries, into our source build, but I am still unable to resolve this issue.
Does anyone have a recipe for building R from source so that it runs correctly within RStudio Server?