Error in RStudioGD(): Shadow graphics device error

Hi Jeff,

I am just gearing up on the RStudio app deployment. I have encountered an error when trying to plots things on the RStudio windows gui that is prompted with the interactive sessions.
any plotting results in an error:
Error in RStudioGD(): Shadow graphics device error: r error 4 (R code execution error)

On the same instance, if I open a terminal and type “rstudio” there, the new window that will pop up works just fine for plotting purposes.

Is this sth you encountered or have any info that can help?
Wondering if there is an environmental variable that needs to be added to the submit file to avoid such an error on the initial RStudio prompt?

I’m not familiar with that, but googling it shows a lot of results. Do you have any other errors, like maybe this ticket in the rstudio github?

There could be an issue with the container you’re running it in (if you’re indeed running it in a container) or how you’ve mounted the /tmp directory in it.

Thanks for your quick response. Our case is bare-metal installation and tmp is accessible. Yeah I am not sure if that’s an installation issue on the RStudio side since I can get the plot graphics when I open a terminal on the same interactive session xcfs.
Seems like an environmental variable is defined differently when rstudio is called through ondemand vs xcfs terminal…

Yea it looks like we run rstudio/1.1.380_server. While trying to get version 1.3 I ran into a lot of X11 type issues.

We also have a lot of X11 libraries like /usr/lib/libGL.so.1 (just as an example) aren’t behind a module. Remember that OOD is just using a shell script through your scheduler. So you may be on to something where bash/ssh do something (to your LD_LIBRARY_PATH) that isn’t enabled during the Rstudio job.

Would it be possible to instruct OOD to open the xfcs terminal first, then run rstudio through modules? (Does that make sense?)