Comment by smitty1e

11 hours ago

I run Arch under WSL2 and then in ~/.bashrc:

WINDOWS_IP=$(ip route | awk '/^default/ {print $3}')

DISPLAY="$WINDOWS_IP:0"

Now I can use the mighty mobaxterm from https://www.mobatek.net to just run whatever and pipe it back to Windows.

One caveat is that the $PATH gets polluted with space characters by 'Doze, so I have to do something like this for QGIS:

PATH=/usr/local/sbin:/usr/local/bin:/usr/bin qgis -n &

This sounds interesting. But I don’t fully follow?

What are your use cases? To run Linux GUI apps?

Does mobaxterm allow you to view those GUI apps?

  • Yes, Moba provides the X11 functionality to allow me to run QGIS under Arch and see the maps.

    • Just had a look at QGIS. It appears to be cross platform. Why not run it directly on Windows?

      Are there benefits running it under Arch and then 'stream' it to Windows?

      Assuming it's faster running QGIS in Linux? Or is it because all your other dev stuff is in Linux?

      (Sorry of these questions are basic - just curious).

This is a much less efficient way of running Linux GUI apps over WSL since it will use software rendering.

WSL2 provides a GPU accelerated Wayland server. If your Mesa build (ver > 22) has d3d12 drivers you can use Windows DirectX as your OpenGL driver. Combined with the WSLg Wayland server you get near native desktop performance out of GUI apps.

  • One other nit was that WSL2 does not expose the USB ports to the Arch guest very easily.

    So I had to install USBIP on the Windows11 host, and bring in a tool chain and compile a Linxux 6.x kernel in order to add external storage for my QGIS data.

    • WSL2's default kernel has USBIP modules built-in. I am using it daily at work for FW development. So I don't think that's your problem. However, WSL kernel might be missing specific USB device classes. Luckily they rolled out kernel module support lately and you can compile modules instead of the full kernel now.