Preview of GUI app support available for Windows Subsystem for Linux

Page 1 of 2 12 LastLast
    Preview of GUI app support available for Windows Subsystem for Linux

    Preview of GUI app support available for Windows Subsystem for Linux


    Posted: 21 Apr 2021

    A year ago at BUILD 2020 we introduced our goal to bring Linux GUI applications to the Windows Subsystem for Linux (WSL) to run Linux GUI applications. We are proud to announce the first preview of this highly anticipated and open source feature! We’ve given this feature the nickname: “WSLg”. Please check out the video below or keep reading to see what you can use this feature for, how it works, and how to install it.



    What can I use GUI application support for?

    WSL lets you run a Linux environment, and up until this point has focused on enabling command line tools utilities and applications. GUI app support now lets you use your favorite Linux GUI applications as well. WSL is used in a wide variety of applications, workloads, and use cases, so ultimately, it’s up to you on what you’d like to use GUI app support for. Below, we’ve highlighted some key scenarios to help you fall in love with running applications in a Linux environment.

    Use your IDE of choice to develop Linux projects

    Visual Studio Code has an amazing experience using VS Code Remote to create a way for you to have a full-fledged Linux IDE directly on your Windows machine, keep extensions and settings across both Windows and different WSL distros (you can view our getting started with VS Code tutorial here. WSLg will let you run other IDEs such as gedit, JetBrains based editors, gvim, etc., to test, build, and debug your Linux applications in a performant manner.

    Here’s an example of running gedit and gvim to edit Linux files directly in WSL.



    Run Linux only applications, or Linux specific use cases like testing

    You can use this feature to run any GUI application that might only exist in Linux, or to run your own applications or testing in a Linux environment. This could be incredibly useful for developers who want to test their cross-platform app, as they can now run it directly on Windows 10, and then easily inside of Linux without ever needing to change machines or manage a virtual machine.

    Let’s look at an example of running TestCafe Studio in WSL to do some web testing from a Microsoft Edge browser running in Linux.



    Build, test and use Linux applications that use audio or the microphone with built in audio support

    Linux GUI applications on WSL will also include out of the box audio and microphone support. This exciting aspect will let your apps play audio cues and utilize the microphone, perfect for building, testing, or using movie players, telecommunication apps, and more.

    Here’s an example of using Audacity running on Linux to record some audio and play it back.



    Bonus: Leverage WSL’s GPU access to run Linux applications with 3D acceleration

    As part of this feature, we have also enabled support for GPU accelerated 3D graphics! Thanks to work that was completed in Mesa 21.0, any applications that are doing complex 3D rendering can leverage OpenGL to accelerate these using the GPU on your Windows 10 machine. This will make some of your more complex applications run smoothly, such as running Gazebo, a robotics simulation tool. This experience will soon be included by default with different WSL distributions, however you can gain access to it right away by following the instructions in this blog post to get the right graphics driver and to ensure your distro has a compatible Mesa version..

    Below you can see the Gazebo application simulating a robot exploring a virtual cave, as well as the Rviz application visualizing the camera feed of the robot and its laser field sensor’s output. Thanks to GPU accelerated 3D graphics we can run this demo at 60 FPS!



    How does this feature work?

    From the demos above, you might have noticed we didn’t need to start an X server manually. That’s because with this feature we are automatically starting a companion system distro, containing a Wayland, X server, pulse audio server, and everything else needed to make Linux GUI apps communicate with Windows. After you’re finished using GUI applications and terminate your WSL distribution the system distro will automatically end its session as well.

    Like with the rest of WSL plumbing, our intention is for this component to be fully managed and seamless for users. Our intentions are for this system distro to be as invisible to the user as possible, and this is why you won’t see this system distro when you run wsl -l -v. Lastly, we’re excited to present that we are using Microsoft’s CBL-Mariner distribution for this system distro! CBL-Mariner is an internal Linux distribution used traditionally for Microsoft’s cloud infrastructure and edge products and services, and we are now extending its use to support GUI apps inside of WSL. You can view the diagram below to see an overall summary of the architecture of this feature.



    For a full in depth view of what we did to make this feature possible and the deep technical details, please view this blog post written by the developers who made this feature possible.

    Getting started with this feature

    We are starting the rollout of this feature as an initial preview before we fully roll it into the WSL experience. To get started using Linux GUI app support, you’ll need to make sure you’re on Windows 10 Insiders preview build 21364 or higher. If you already have WSL installed, all you need to do is run wsl --update and you’ll be set to use GUI apps. If you don’t have WSL enabled, running wsl --install will install WSLg automatically as part of the initial WSL setup.

    You can find the full install instructions at the GitHub repositories’ README: GitHub - microsoft/wslg: Enabling the Windows Subsystem for Linux to include support for Wayland and X server related scenarios . We also highly recommend that you have GPU compute support enabled in WSL for the best performance, please see this section of the install instructions to see how you can ensure that feature is enabled.

    Feedback

    Please file any technical issues, or feature requests for GUI application support on the WSLg Github repository. For general WSL issues, please file them at the WSL repository. You can also follow up with me on Twitter @craigaloewen and all WSL team members that are on Twitter using this list. Please stay tuned to this blog for more exciting WSL announcements, and we can’t wait to hear what you think about this new feature.


    Craig Loewen
    Program Manager, Windows Developer Platform


    Source: https://devblogs.microsoft.com/comma...m-for-linux-2/


    Brink's Avatar Posted By: Brink
    21 Apr 2021


  1. Posts : 10,740
    Windows 11 Workstation x64
       #1

    I'm going to have to have a play with that.
      My Computers


  2. Posts : 7,254
    Windows 10 Pro 64-bit
       #2

    Let me know if you can get WSL and vmware working together.
      My Computers


  3. Posts : 7,254
    Windows 10 Pro 64-bit
       #3

    I am getting these apt errors on a fresh install of WSL.

    Preview of GUI app support available for Windows Subsystem for Linux-wsl2.png
      My Computers


  4. Posts : 7,254
    Windows 10 Pro 64-bit
       #4

    I managed to fix WSL and its currently running Kate the editor.

    Preview of GUI app support available for Windows Subsystem for Linux-wsl2withkate.png

    How are you getting on with yours @z3r010?
      My Computers


  5. Posts : 10,740
    Windows 11 Workstation x64
       #5

    swarfega said:
    I managed to fix WSL and its currently running Kate the editor.

    Preview of GUI app support available for Windows Subsystem for Linux-wsl2withkate.png

    How are you getting on with yours @z3r010?
    I've not even tried yet, I need to load up an insider build first.
      My Computers


  6. Posts : 7,254
    Windows 10 Pro 64-bit
       #6

    Good luck.
      My Computers


  7. Posts : 12
    Windows 10 Pro x64 21H1
       #7

    This was such an awaited feature. It even has partial GPU acceleration but you need to install latest Mesa first. On Ubuntu you can update Mesa like this:

    sudo add-apt-repository ppa:kisak/kisak-mesa
    sudo apt-get update


    swarfega said:
    I am getting these apt errors on a fresh install of WSL.

    Preview of GUI app support available for Windows Subsystem for Linux-wsl2.png
    Those type of errors are due to a clock drift in WSL2. With date you can see if the distro time is the same as the host. Should be fixed in latest linux kernel available on Insiders v5.10.16.3. Just run wsl.exe --update from an elevated cmd to upgrade it.
    Last edited by jygoro; 24 Apr 2021 at 14:05.
      My Computer


  8. Posts : 7,254
    Windows 10 Pro 64-bit
       #8

    Thanks for your kind support, but I got it working and can run KDE apps
      My Computers


  9. Posts : 7,254
    Windows 10 Pro 64-bit
       #9

    Could you install a whole DE such as KDE on this or am I being to optimistic?
      My Computers


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 20:05.
Find Us




Windows 10 Forums