ROOT on Windows 11 WSL2 / WSLg

So I tried staying with WSL2 and using VcXsrv, and it works fine, as far as I have tested.
I don’t know if behind curtains WSL is complaining for having 2 GUI servers, but it seems to work :slight_smile:

Just for completeness, when using WSL2 and VcXsrv (don’t know with Xming), adding these lines to .bashrc is needed:

export DISPLAY=$(awk '/nameserver / {print $2; exit}' /etc/resolv.conf 2>/dev/null):0
export LIBGL_ALWAYS_INDIRECT=1

but is not enough (in either Windows 10 or 11). When starting XLaunch, which always asks for some settings, one has to also activate the option “Disable access control” (in “Extra settings”), which is unchecked by default. This option is not needed when using WSL1 (and .bashrc only needs export DISPLAY=localhost:0.0 at least in the systems I’ve tried).
image

1 Like