Using something like 'rgl' in rstudio server ood app?

We have a user who primarily uses rstudio-desktop on a Mate Desktop session through the ood. He tried to use the rstudio-server ood app but when he ran ‘library(rgl)’ to display his graph there was a error regarding x11 not being run. Is it possible to do some kind of graph using rgl and x11 when using the turbovnc client connections?

Any info would be great and I’ll do my best to give the scenario as needed.

Could you please show me the error you were getting and possibly describe the scenario a bit more?

Hello yes!
Scenario:
User1 usually X11 forwards an Rstudio-Desktop (however x11 is kinda clunky over VPN and the like) we recommended he switch to using the web based rstudio-ood-app. When he runs the below code instead of opening another X11 window it errors out.

Error:

library(rgl)
Warning messages:
1: In rgl.init(initValue, onlyNULL) : RGL: unable to open X11 display
2: ‘rgl.init’ failed, running with ‘rgl.useNULL = TRUE’.
points3d(rnorm(100))

Clarification:
I am not particularly an R user but will see if we can get a screenshot of the working app workflow for reference.

Could you try running the following in your R console:

  1. Run options(rgl.useNULL=TRUE) or set an environment variable named RGL_USE_NULL before loading RGL
  2. Restart the session using .rs.restartR()
  3. Load the library again

Okay, that worked for me! Let me test this with the end user and if it works for him we might have a good solution.

Thanks i’ll comment back as soon as I can.

1 Like