RStudio Desktop on WSL2 Black Screen on Startup

Hello, I have a new installation of WSL2 (Ubuntu 20.04 LTS) on Windows 10, plenty of RAM. I also installed R 4.1.0 without a problem; it runs perfectly well from the command line. I have the GWSL X Windows Server package.

I installed rstudio with gdebi, and it appeared to install, but on running rstudio from the graphical shortcut, all I get is a black window.

When I tried running it from the command line, I got some errors about missing which I addressed with installing libxcursor1, and some other missing library that I fixed with installing libnss3. But now when I try running from the CLI, I get

qt.qpa.xcb: could not connect to display
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, xcb.

So: it doesn't work from the graphical shortcut, or from the CLI.

I tried making sure software rendering was set using this link. But that didn't fix the problem.

Any ideas?

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.