At the Microsoft Build 2020 virtual developers’ conference, CEO Satya Nadella announced that Windows Subsystem for Linux (WSL) 2.0 would soon support Linux GUIs and applications. That day is closer now than ever before. At the recent X.Org Developers Conference (XDC), Microsoft partner developer lead Steve Pronovost revealed that Microsoft has made it possible to run graphical Linux applications within WSL.
It’s always been possible to run Linux graphical programs such as the GIMP graphics editor, Evolution e-mail client, and LibreOffice on WSL. But it wasn’t easy. You had to install a third-party X Window display server, such as the VcXsrv Windows X Server in Windows 10, and then do some tuning with both Windows and Linux to get them to work together smoothly. The X Window System underlies almost all Linux graphical user interfaces.
Now, Microsoft has ported a Wayland display server to WSL. Wayland is the most popular X Window compatible server. In WSL2, it connects the graphical Linux applications via a Remote Desktop Protocol (RDP) connection to the main Windows display. This means you can run Linux and Windows GUI applications simultaneously on the same desktop screen.
Pronovost explained:
WSL essentially runs Linux inside of a Virtual Machine hosted by Windows and we integrate applications (console, and now GUI) back onto your Windows desktop so you can run both Win32 and Linux applications inside of a unified experience. Because Linux is running in VM, we can’t run the native GPU driver that expects direct access to the GPU (unless we were to do something like discrete device assignment and assign one of the host GPU to the VM… but then the host would lose access to that GPU!). With GPU-PV [GPU Paravirtualization] we can essentially project the host GPU in Linux and have both Linux and Windows processes share the same physical GPU without the need for fixed resource partitioning.
Craig Loewen, Microsoft WSL Program Manager, added in a Twitter thread that the key differences between using a third-party X server and the built-in Wayland server is that: “You don’t need to start up or start the server, we’ll handle that for you.” In addition, it comes with “Lovely integration with Windows,” such as drop shadows and Linux icon support.
Loewen also said you can run a Linux web browser in it. “We haven’t tested it extensively with a full desktop environment yet, as we want to focus on running often asked for apps first, and primarily IDEs [integrated development environment] so you can run those in a full Linux environment,” he said.
Don’t get too excited about it just yet, though. Loewen continued, “We don’t yet have an ETA for the beta channel, however, this work will be available in general for Insiders to try within the next couple of months.”
Microsoft’s integration of Linux into Windows has been coming for some time. Four years ago, Microsoft introduced WSL, which brought the Linux Bash shell to Windows 10. With Bash and WSL, you can run most Linux shell tools and popular Linux programming languages.
As time went on, Linux became more of a first-class citizen on the Windows desktop. Multiple Linux distros, starting with Ubuntu, were followed by Red Hat Fedora and SUSE Linux Enterprise Desktop (SLED). Then, Microsoft replaced its WSL translation layer, which converted Linux kernel calls into Windows calls, with WSL 2. This update came with Microsoft’s own Linux kernel running on a thin version of the Hyper-V hypervisor.
More recently, starting with the Windows 10 Insider Preview build 20211, Windows users can access Linux file systems. This includes access to Linux file systems, such as ext4, which Windows doesn’t natively support. It also means, if you dual-boot Windows and Linux with different disks, you can now access Linux files from Windows. With this, you can access Linux files from both the Windows File Explorer and PowerShell window with administrative privilege.
At the rate things are going, my “crazy” prediction that Windows 11 might run on top of Linux may yet come true!