Using RStudio in a VNC session

Rstudio per default wants to use a GPU for rendering. Disabling this by setting the following environment variable before starting rstudio is recommended as a solution to similar problems:

export RSTUDIO_CHROMIUM_ARGUMENTS='--disable-gpu'

This does not work if RStudio is started in a VNC session1 or when using X11 forwarding2 3. RStudio will not start and display an error messages like the following:

WebEngineContext used before QtWebEngine::initialize() or OpenGL context creation failed.

To use RStudio in a VNC session or with X11 forwarding, add the line desktop.renderingEngine=software below the section [General] to the file $HOME/.config/RStudio/desktop.ini.
The file might then look something like this:

[General]
cookies=@Invalid()
desktop.renderingEngine=software

[mainwindow]
geometry=@ByteArray(...

FAQ/RStudio (last edited 2021-11-29 15:25:59 by stroth)