What does HackerNews think of wslg?

Enabling the Windows Subsystem for Linux to include support for Wayland and X server related scenarios

Language: C++

#48 in Hacktoberfest
WSLg(Windows Subsystem for Linux GUI) uses RDP and FreeRDP to work: https://github.com/microsoft/wslg

I haven't tried it yet, but I'm hopeful the experience is better than last time I tried Hyper-V enhanced linux experience. I imagine this use case is getting FreeRDP way more attention.

For years I've developed in a Linux VM on a Windows host via VirtualBox. The typing lag on this, particularly in IDEs like VSCode and Rider, finally got to me. So, I moved over to WSL and have to say; the experience is amazing.

Edit: I should say that I haven't used the WSL GUI functionality yet. Been using VSCode's WSL support and it's been amazingly seamless so far. I get native Windows VSCode performance while my project and all its plugins are actually running in the Hyper-V backed WSL linux VM.

This is running in WSL?

Microsoft has some wayland stuff already for WSL, though I think internally there's RDP involved: https://github.com/microsoft/wslg

Apparently, WSLg does away with the need for a separate X server, making things easy to use:

https://github.com/microsoft/wslg

The "Apparently" is there because it's not something I've tried myself (I'm a Linux desktop user), instead it's something several of our users have tried and said works:

https://github.com/sqlitebrowser/sqlitebrowser/issues/2142#i...

Sorry about being stuck on Windows 10, but Windows 11 has WSLg[0], which gives you a reasonable X server out of the box. I liked X410, but WSLg is seamless. When combined with no fuss CUDA support and great docker integration, WSL2 on Windows 11 is almost a better Linux than Linux. Then you run into an edge case, spend hours digging at it, and leave curled up into a fetal position.

[0]: https://github.com/microsoft/wslg

The developer channel version of WSL2 comes with Wayland, which might help push adoption a bit. https://github.com/microsoft/wslg
The "wslg" version of WSL, which comes with a Wayland display server built-in, is perhaps a driver.

The github page still says it requires Windows 11: https://github.com/microsoft/wslg

Though I suppose it's possible they've also pushed it to the insider builds for Windows 10.

Guys. Windows 11 runs linux desktop apps via WSLg. So how about nailing 2021 as year of Linux desktop? :)

Brought to you by Microsoft: https://github.com/microsoft/wslg

I was just looking into various approaches to use process isolation for security on the desktop in Linux.

Containers within VMs are a norm for security in cloud-native [1]. Some lessons there could be applied to desktop.

One option is the approach of Spectrum OS [2]. They use crosvm (same as what Firecracker "micro VMs" uses) and virtio_wl [3][4].

Another approach might be x11docker [5] with Kata Containers [6].

Curiously, the work for WSLg (WSL with graphics) [7][8] to support graphical Linux guest VMs could also be applied on a Linux host.

  1: https://archive.fosdem.org/2020/schedule/event/kernel_address_space_isolation/attachments/slides/3889/export/events/attachments/kernel_address_space_isolation/slides/3889/Address_Space_Isolation_in_the_Linux_Kernel.pdf
  2: https://spectrum-os.org/
  3: https://spectrum-os.org/design.html
  4: https://alyssa.is/using-virtio-wl/
  5: https://github.com/mviereck/x11docker
  6: https://katacontainers.io
  7: https://github.com/microsoft/wslg
  8: https://xdc2020.x.org/event/9/contributions/611/attachments/702/1298/XDC2020_-_X11_and_Wayland_applications_in_WSL.pdf
Now that WSLg support (https://github.com/microsoft/wslg) has landed in a release version of windows, another approach to this is to create new WSL distros for specific tasks, and run browsers from them.

Whilst it's a VM, I've found start-up time for WSL instances to be pretty quick, and it's pretty easy to create and clone a template VM (one approach https://raesene.github.io/blog/2020/05/31/Custom_Pentest_Dis... )

>You can only run command line programs, although I understand this could be different in Windows 11

WSLg solves this, apparently

https://github.com/microsoft/wslg