Thank you for the response. Yes I have installed XLaunch, I started it, went through the prompts and clicked 'Finish' and then installed the shell variables. Maybe there is an option I should click on the XLaunch setup?
In the XLaunch setup for VcxSrv, you should set Native opengl off, Disable access control on. The installation instructions are written for wsl version 1, but the default installation nowadays is version 2. Xlaunch should be started each time before starting wsl Ubuntu.
You can force version 1 for all wsl instances or for specific wsl instances like this:
wsl --set-default-version 1
wsl2 may be configured for wslg in which case, that supports X11 graphics without VcxSrv, but it doesn't do a very good job of it the last time I checked, about a year ago. This is how to turn off wslg if it's being used.
Users wanting to use different servers than the one provided by WSLg can change these environment variables. User can also choose to turn off the system distro entirely by adding the following entry in their .wslconfig file (located at c:\users\MyUser.wslconfig - on the Windows side of the file system). This will turn off support for GUI applications in WSL.
Many at NIH use mobaXterm for X11 ssh and terminal features. It also features an integrated wsl controls. That would be instead of VcxSrv.
One of these ways ought to work, so let us know how it works out.
Thank you very much, it works now!
A couple of things that were going on (in case someone has the same issue).
It seems in the past I had installed WSL2 and an older version of Ubuntu (which I removed), so when I typed :
wsl --list --verbose
the (new) 20.04 version was associated with version 2.
wsl --set-version Ubuntu-20.4 1
which associated the Ubuntu with version 1. I also changed the XLaunch setup as you suggested.
National Institute of Mental Health (NIMH) is part of the National Institutes of
Health (NIH), a component of the U.S. Department of Health and Human