Windows can now run Linux GUI apps directly in WSL2 Preview

JC Torres - Apr 22, 2021, 12:41am CDT
Windows can now run Linux GUI apps directly in WSL2 Preview

A few decades ago, the powers that be at Microsoft characterized Linux and open source in general as a cancer. Today, the company has pretty much embraced and even extended them, acquiring GitHub and allowing Linux to run almost natively inside Windows. The latter, officially named Windows Subsystem for Linux, is perhaps one of the best and most perplexing embodiments of its newfound love for Linux. It has now taken one step further by upgrading WSL2 to allow running graphical Linux apps, no third-party workarounds needed.

WSL started out simply as a way for Linux developers and system administrators to get access to their beloved tools without having to leave Windows or even running a heavy virtual machine. While WSL2 allowed running almost pure Linux distributions without modification, it was still limited to the command line and text-only tools. Unsurprisingly, developers found ways to get around that limitation to run GUI apps but not without moderately complicated setups and caveats.

Last year, Microsoft teased an upcoming update that would allow that to happen without any other app or multi-setup processes. That has finally happened and the next version of WSL2 will automatically include and set up everything that’s needed to launch and run GUI Linux apps without any intermediate steps. Even better, that setup includes support for audio, both playback and recording, as well as OpenGL for GPU access.

There will most likely be questions on why Microsoft would do so much to cater to Linux developers and users and what use this WSL2 feature nicknamed “WSLg” has. Simply put, it allows developers to write and test their cross-platform or Linux-only applications without having to give up Windows at all.

WSLg is currently available on Windows 10 Insider Preview build 21364 or later. Hopefully, it won’t be too long before it actually rolls out to the rest of the population. Those interested in seeing how it works can take a peek at WSLg’s source code on GitHub because, perhaps a bit surprisingly, Microsoft is releasing it as open source software.


Must Read Bits & Bytes