1

As for creating a root window in WSLg (e.g. for running a full Desktop Environment) there have been several options, but performance varies between them. I've tried several methods for having better performance/smoothness mentioned below. Is it possible to take control of WSLg rdp connection manually?

  • Using X servers in Windows: Only good in multiwindow mode, probably because of:

    AIGLX: No native OpenGL in modes with a root window

  • VNC/Xrdp: Slow compared to other methods.

  • Using FreeRDP implementation in WSLg: Probably has the best performance overall (by using Xwayland as mentioned in this answer).

These almost always perform "better" when using LIBGL_ALWAYS_SOFTWARE=1.

In order to have some features of rdp and X servers which the WSLg does not provide (like key hooks) and also having more control over it, I tried Weston with --backend=rdp-backend.so, but the performance was not close to the third option above (even with several optimizations). I tried removing msrdc/mstsc executables from Windows and making a direct connection from mstsc, which ended in Error code 0x4.

Edit: There seems to be some useful tweaks here and here, but in practice not using remoteapplicationmode:i:1 leads to a poor and laggy result.

Miranda
  • 11
  • 3
  • I wish I had more time to dig into this one, but it's probably going to be a while before I can dedicate the time it would need. My recommendation would be to see how much you can reverse engineer the [WSLg System Distribution](https://github.com/microsoft/wslg#wslg-system-distro). As Microsoft says, they *"do want to encourage folks to tinker with it and experiment. Although [they] expect very few folks to actually need or want to do that, [they]'ve shared detailed instruction on [their] contributing page on how to both build and deploy a private version of the system distro."* – NotTheDr01ds Apr 29 '22 at 13:30

0 Answers0