Code Monkey home page Code Monkey logo

wslg's Introduction

Welcome to WSLg

WSLg is short for Windows Subsystem for Linux GUI and the purpose of the project is to enable support for running Linux GUI applications (X11 and Wayland) on Windows in a fully integrated desktop experience.

WSLg provides an integrated experience for developers, scientists or enthusiasts that prefer or need to run Windows on their PC but also need the ability to run tools or applications which works best, or exclusively, in a Linux environment. While users can accomplish this today using a multiple system setup, with individual PC dedicated to Windows and Linux, virtual machine hosting either Windows or Linux, or an XServer running on Windows and projected into WSL, WSLg provides a more integrated, user friendly and productive alternative.

WSLg strives to make Linux GUI applications feel native and natural to use on Windows. From integration into the Start Menu for launch to appearing in the task bar, alt-tab experience to enabling cut/paste across Windows and Linux applications, WSLg enables a seamless desktop experience and workflow leveraging Windows and Linux applications.

WSLg Integrated Desktop

Installing WSLg

Pre-requisites

  • WSLg is supported on both Windows 11 and Windows 10. Windows 10 users must ensure their Windows 10 installation is fully up to date by visiting Windows Update and installing all available updates.

  • WSLg is available both as part of the Windows 11 WSL inbox support as well as through the Windows Subsystem for Linux from the Microsoft Store. It is highly recommended to use the Microsoft Store version of WSL, which supports both Windows 10 and Windows 11, and contains the most up to date version of WSL and WSLg.

  • Make sure to update your graphics driver to the latest driver available from your GPU manufacturer's website to benefit from GPU acceleration in your WSL environment.

Install instructions (Fresh Install - no prior WSL installation)

From a command prompt with administrator privileges, run the command wsl --install -d Ubuntu, then reboot if prompted.

After reboot the installation will continue. You'll be asked to enter a username and password. These will be your Linux credentials, they can be anything you want and don't have to match your Windows credentials.

Voilà! WSL and WSLg are installed and ready to be used!

Install instructions (Existing WSL install)

If you have an existing WSL installation without WSLg and want to update to the latest version of WSL which includes WSLg, run the command wsl --update from an elevated command prompt.

Please note that WSLg is only compatible with WSL 2 and will not work for WSL distribution configured to work in WSL 1 mode. Verify that your Linux distro is configured for running in WSL 2 mode, if not switch to WSL 2. While you can continue to run Linux distro in WSL 1 mode after installing WSLg if you so desired, a distro configured to run in WSL 1 mode will not be able to communicate with WSLg and will not be able to run GUI applications.

You can list your currently installed distro and the version of WSL they are configured for using the following command from an elevated command prompt.

   wsl --list -v

If running in version 1 mode, switch to version 2. This can take a while.

   wsl --set-version _distro_name_ 2

Restart WSL by running this command from an elevated command prompt, make sure to save any pending work first:

    wsl --shutdown

Updating WSL + WSLg

To update to the latest version of WSL and WSLg released for preview, simply run wsl --update from an elevated command prompt or powershell.

You'll need to restart WSL for the changes to take effect. You can restart WSL by running wsl --shutdown from an elevated command prompt. If WSL was currently running, it will shutdown, make sure to first save any in progress work! WSL will be automatically restarted the next time you launch a WSL application or terminal.

First Launch

If you have installed the Ubuntu Linux distro per these instructions, you'll find an Ubuntu icon in your start menu, launch it. This will launch the WSL 2 VM, launch the Ubuntu WSL distro in that VM and give you a terminal to interact with it. Voilà! You're running Linux on Windows!

If you would like to explore additional Linux distributions built for WSL, you can use the wsl --list --online command from an elevated command prompt to enumerate the list of available distributions for your system. You can have multiple Linux distributions installed within WSL and they will happily coexist side-by-side, so don't be scared to experiment and try things out.

Congrats you are done and ready to use GUI apps!

Install and run GUI apps

If you want to get started with some GUI apps, you can run the following commands from your Linux terminal to download and install some popular applications. If you are using a different distribution than Ubuntu, it may be using a different package manager.

## Update list of available packages
sudo apt update

## Gedit
sudo apt install gedit -y

## GIMP
sudo apt install gimp -y

## Nautilus
sudo apt install nautilus -y

## VLC
sudo apt install vlc -y

## X11 apps
sudo apt install x11-apps -y

## Google Chrome
cd /tmp
sudo wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo dpkg -i google-chrome-stable_current_amd64.deb 
sudo apt install --fix-broken -y
sudo dpkg -i google-chrome-stable_current_amd64.deb

## Microsoft Teams
cd /tmp
sudo curl -L -o "./teams.deb" "https://teams.microsoft.com/downloads/desktopurl?env=production&plat=linux&arch=x64&download=true&linuxArchiveType=deb"
sudo apt install ./teams.deb -y

## Microsoft Edge Dev Browser
sudo curl https://packages.microsoft.com/repos/edge/pool/main/m/microsoft-edge-dev/microsoft-edge-dev_118.0.2060.1-1_amd64.deb -o /tmp/edge.deb
sudo apt install /tmp/edge.deb -y

Once these applications are installed, you'll find them in your start menu under the distro name. For example Ubuntu -> Microsoft Edge. You can also launch these from your terminal window using the commands:

  • xcalc, xclock, xeyes
  • gimp
  • gedit ~/.bashrc
  • nautilus
  • vlc
  • google-chrome
  • teams
  • microsoft-edge

WSLg Architecture Overview

WSLg Architecture Overview

User Distro

The user distro is essentially the WSL distribution you are using for your Linux work. You can use the command wsl --list --online from an elevated Windows command prompt to list the WSL distributions available on your system. You can run multiple user distros side-by-side and they will peacefully coexist, so don't be afraid of trying out new distro. Each user distro will be paired with a unique instance of the system distro, but you can still interact across GUI applications running in different user distro seamlessly, such as cut/paste between them. The underlying containerization of the various userspace should be invisible to you.

All user and system distros for a particular Windows user run within the same WSL virtual machine against a single instance of the Linux kernel. Different Windows users on a PC have their own VM and instance of WSL. Your Linux environment is guaranteed to always be your own and not shared with other Windows users on the same PC.

WSLg System Distro

The system distro is where all of the magic happens. The system distro is a containerized Linux environment where the WSLg XServer, Wayland server and Pulse Audio server are running. Communication socket for each of these servers are projected into the user distro so client applications can connect to them. We preconfigure the user distro environment variables DISPLAY, WAYLAND_DISPLAY and PULSE_SERVER to refer these servers by default so WSLg lights up out of the box.

Users wanting to use different servers than the one provided by WSLg can change these environment variables. User can also choose to turn off the system distro entirely by adding the following entry in their .wslconfig file (located at c:\users\MyUser\.wslconfig). This will turn off support for GUI applications in WSL.

[wsl2]
guiApplications=false

The system distro is based on the Microsoft CBL-Mariner Linux. This is a minimal Linux environment, just enough to run the various pieces of WSLg. For details on how to build and deploy a private system distro please see our build instructions.

Every WSL 2 user distro is paired with its own instance of the system distro. The system distro runs partially isolated from the user distro to which it is paired, in its own NS/PID/UTS namespace but shares other namespaces such as IPC, to allow for shared memory optimization across the boundary.

While a user can get a terminal into the system distro, the system distro is not meant to be used directly by users. Every instance of the system distro is loaded read-only from its backing VHD. Any modifications, made to the in-memory instance of the system distro (such as installing new packages or creating a new file), are effectively discarded when WSL is restarted. The reason we do this is to enable a servicing model for the system distro where we replace the old one with the new one without having to worry about migrating any user data contained within. We use a read-only mapping such that the user gets a well known discard behavior on any changes, every time WSL is restarted, instead of getting a surprise when WSL is serviced.

Although the Microsoft published WSLg system distro as read-only, we do want to encourage folks to tinker with it and experiment. Although we expect very few folks to actually need or want to do that, we've shared detailed instruction on our contributing page on how to both build and deploy a private version of the system distro. Most users who just want to use GUI applications in WSL don't need to worry about those details.

WSLGd

WSLGd is the first process to launch after init. WSLGd launches Weston (with XWayland), PulseAudio and establishes the RDP connection by launching mstsc.exe on the host in silent mode. The RDP connection will remain active and ready to show a new GUI applications being launch on a moment's notice, without any connection establishment delays. WSLGd then monitors these processes and if they exit by error (say as a result of a crash), it automatically restarts them.

Weston

Weston is the Wayland project reference compositor and the heart of WSLg. For WSLg, we've extended the existing RDP backend of libweston to teach it how to remote applications rather than monitor/desktop. We've also added various functionality to it, such as support for multi-monitor, cut/paste, audio in/out, etc...

The application integration is achieved through an RDP technology called RAIL (Remote Application Integrated Locally) and VAIL (Virtualized Application Integrated Locally). The main difference between RAIL and VAIL is how pixels are transported across from the RDP server to the RDP client. In RAIL, it is assumed that the Server and Client are running on different physical systems communicating over the network and thus pixels need to be copied over the RDP transport. In VAIL, it is understood that the Server and Client are on the same physical system and can share memory across the Guest/Host VM boundary. We've added support for both RAIL and VAIL to the libweston RDP backend, although for WSLg only the VAIL support is effectively used. While building WSLg, we first implemented RAIL while the necessary pieces enabling the switch to VAIL were being developed in parallel. We decided to keep that support in as it could reuse in other interesting scenarios outside of WSLg, for example for remoting application from a Pi running Linux. To share memory between the Linux guest and Windows host we use virtio-fs.

RAIL-Shell

Weston is modular and has various shells today, such as the desktop shell, fullscreen shell (aka kiosk), and automative shell. For WSLg we introduced a new shell called the RAIL Shell. The purpose of the RAIL Shell is to help with the remoting of individual windows from Linux to Windows, as such the shell is very simplistic and doesn't involve any actual widgets or shell owned pixels.

FreeRDP

Weston leverages FreeRDP to implement its backend RDP Server. FreeRDP is used to encode all communications going from the RDP Server (in Weston) to the RDP Client (mstsc on Windows) according to the RDP protocol specifications. It is also used to decode all traffic coming from the RDP Client into the RDP server.

Pulse Audio Plugin

For audio in (microphone) and out (speakers/headphone) WSLg runs a PulseAudio server. WSLg uses a sink plugin for audio out, and a source plugin for audio in. These plugins effectively transfer audio samples between the PulseServer and the Weston RDP Server. The audio streams are merged by the Weston RDP Server onto the RDP transport, effectively enabling audio in/out in the Weston RDP backend across all scenarios (Desktop/RAIL/VAIL style remoting), including WSLg.

WSL Dynamic Virtual Channel Plugin (WSLDVCPlugin)

WSLg makes use of a custom RDP virtual channel between the Weston RDP Server and the mstsc RDP Client running on the Windows host. This channel is used by Weston to enumerate all Linux GUI applications (i.e. applications which have a desktop file entry of type gui) along with their launch command line and icon. The open source WSLDVCPlugin processes the list of Linux GUI applications sent over this channel and creates links for them in the Windows start menu.

OpenGL accelerated rendering in WSLg

While WSLg works with or without virtual GPU support, if you intend to run graphics intensive applications such as Blender or Gazebo, it is best to be running on a system with a GPU and driver that can support WSL. An overview of our vGPU architecture and how we make it possible for Linux applications to access the GPU in WSL is available at our DirectX blog.

Support for OpenGL accelerated rendering is made possible through the work our D3D team has done with Collabora and the Mesa community on creating a d3d12 Gallium driver.

Support for Linux, including support for WSLg, has been upstream and part of the Mesa 21.0 release. To take advantage of this acceleration, you'll need to update the version of Mesa installed in your user distro. It also requires that your distro vendor chose to build and publish the new d3d12 Gallium driver to their package repository. We're working with the various WSL distro publishers to inform them of these changes.

Please note that for the first release of WSLg, vGPU interops with the Weston compositor through system memory. If running on a discrete GPU, this effectively means that the rendered data is copied from VRAM to system memory before being presented to the compositor within WSLg, and uploaded onto the GPU again on the Windows side. As a result, there is a performance penalty proportionate to the presentation rate. At very high frame rates such as 600fps on a discrete GPU, that overhead can be as high as 50%. At lower frame rate or on integrated GPU, performance much closer to native can be achieved depending on the workload. Using a vGPU still provides a very significant performance and experience improvement over using a software renderer despite this v1 limitation.

WSLg Code Flow

WSLg builds on the great work of the Linux community and makes use of a large number of open source projects. Most components are used as-is from their upstream version and didn't require any changes to light up in WSLg. Some components at the heart of WSLg, in particular Weston, FreeRDP and PulseAudio, required changes to enable the rich WSLg integration. These changes aren't yet upstream. Microsoft is working with the community to share these contributions back with each project such that, over time, WSLg can be built from upstream component directly, without the need for any WSLg specific modifications.

All of these in-flight contributions are kept in Microsoft mirror repos. We keep these mirrors up to date with upstream releases and stage our WSLg changes in those repos. WSLg pulls and builds code from these mirror repos as part of our Insider WSLg Preview releases. These mirrors are public and accessible to everyone. Curious developers can take a peek at early stages of our contribution by looking at code in those mirrors, keeping in mind that the final version of the code will likely look different once the contribution reaches the upstream project and is adapted based on the feedback receives by the various project owners. All of our mirrors follow the same model. There is a main branch which correspond to the upstream branch at our last synchronization point. We update the main branch from time to time to pick update from the upstream project. There is also a working branch that contains all of our in-flight changes. WSLg is built using the working branch from each of the mirror projects.

The projects that WSLg maintains mirrors for will change over time as in-flight contributions evolve. Once some contributions are upstream, it may no longer be necessary to maintain a mirror, at which point it will be removed and WSLg will start to leverage the upstream version of the component directly. As we light up new functionality in WSLg, new mirrors may be introduced to stage contributions to new components. As such, expect the list of mirrors to change overtime.

At this point in time, we have the following project mirrors for currently in-flight contributions.

Project Upstream Repo WSLg Mirror
Weston https://github.com/wayland-project/weston https://github.com/microsoft/Weston-mirror
FreeRDP https://github.com/FreeRDP/FreeRDP https://github.com/microsoft/FreeRDP-mirror
PulseAudio https://github.com/pulseaudio/pulseaudio https://github.com/microsoft/PulseAudio-mirror

The following is a high level overview of the currently in-flight contributions to each project contained within these mirrors.

Weston

WSLg leverages Weston as the Wayland compositor bridging the Linux and Windows worlds using RDP technology to remote application content between them. Weston already had an RDP backend, but it was limited to single-monitor-desktop remoting. We've greatly enhanced that RDP backend to include advanced functionality, such as multi-monitor support, clipboard integration for copy/paste, and audio in/out. We've enabled new remoting modes called RAIL (Remote Application Integrated Locally) and VAIL (Virtualized Application Integrated Locally), where individual applications, rather than desktops/monitors, are remoted. These changes are not specific to WSLg; they add functionality to the existing RDP backend and are reusable in other scenarios as well (i.e. using the new Weston RDP backend to remote application running on a Raspberry Pi to another device running an RDP client).

To enable rich integration in WSLg, we've also added a small plugin to the RDP backend specific to WSLg. In Weston, the plugin is responsible for attaching to the user distro and searching for installed applications (aka the desktop file). The plugin sends the Windows host a list of all applications found along with their launch commands and icons. On the Windows host, an open source mstsc plugin part of the WSLg project uses that information to create shortcuts for these Linux applications to the Windows Start Menu.

We've also fixed several bugs impacting various applications. Generally, these were problems that impacted Weston in all modes and were not specific to WSLg.

FreeRDP

Weston currently uses FreeRDP for its RDP Backend. WSLg continues to leverage FreeRDP and we have added support for a new RDP Protocol/Channel to enable VAIL optimized scenario as well as support for the WSLg plugin. We've also fixed various bugs that were impacting interops with mstsc or causing instability.

PulseAudio

For PulseAudio, our contributions focused on a sink and a source plugin that shuffle audio data between PulseAudio and the Weston RDP backend such that the audio data can be integrated over the RDP connection back to the host. There are no changes to the core of PulseAudio outside of adding these new plugins.

Contributing

If you would like to tinker with or contribute to WSLg, please see our CONTRIBUTING page for details, including how to build and run private a version of WSLg.

Reporting a non-security issues

For non-security related issues, such as reporting a bug or making a suggestion for a new feature, please use this project's issues tracker.

Reporting security issues

To report security issues with WSLg or any other Microsoft products, please follow the instructions detailed here.

Trademarks

This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft trademarks or logos is subject to and must follow Microsoft's Trademark & Brand Guidelines. Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship. Any use of third-party trademarks or logos are subject to those third-party's policies.

wslg's People

Contributors

agrawal-d avatar biswa96 avatar blackliner avatar blucobalt avatar brdegeer avatar craigloewen-msft avatar crramirez avatar edwardbetts avatar haltarys avatar hideyukn88 avatar jessemitchell-reiss avatar kanishka-developer avatar kingosticks avatar nazrhyn avatar ngc avatar nigrimsft avatar noriakia avatar nunix avatar omerraviv avatar oneblue avatar onomatopellan avatar patricklang avatar peter-mcconnell avatar raymo111 avatar shunkica avatar sivileri avatar spronovo avatar viniciusjarina avatar vmcj avatar xenorinspire avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

wslg's Issues

Linux GUI apps aren't showing up in Start menu (shell script support in start menu shortcut)

Environment

Windows build number: Microsoft Windows [Version 10.0.21343.1010]
Your Distribution version: Ubuntu 20.04
Your WSLg version: 0.2.13


Steps to reproduce

Commands I ran to install Jet Brains Rider:

curl https://download-cf.jetbrains.com/rider/JetBrains.Rider-2020.3.4.tar.gz -o /tmp/rider.tar.gz
sudo tar -xzf /tmp/rider.tar.gz -C /opt
cd /opt/JetBrains\ Rider-2020.3.4/bin
bash ./rider.sh

WSL logs:
pulseaudio.log
weston.log
versions.txt

Expected behavior

I would see the Jet Brains Rider app under the Ubuntu folder in the Start Menu

Actual behavior

There is no Ubuntu folder in the Star Menu

[process exited with code 4294967295]

Environment

Windows 10 Pro build 21364.co_release.210416-1504
Ubuntu 20.04

Steps to reproduce

1. Update Windows
2. Update WSL to support WSLg
2. Run the distro


I updated my Windows to build 21364 and then ran the command WSL --update as directed by the website https://github.com/microsoft/wslg.

Instruction:
"Updating WSL + WSLg
To update to the latest version of WSL and WSLg released for preview, simply run wsl --update from an elevated command prompt or powershell. "

When I restarted the computer, I was unable to access the WSL and presented the following error:

The parameter is incorrect.
[process exited with code 4294967295]

I looked for the .wslconfig file in C: \ Users \ MyUser, to set the parameter below, but it doesn't exist on my computer:
 
[wsl2]
guiapplications = false

WSL logs:

attach wsl.etl

wsl.zip

Expected behavior

WSL fails to start with:.

Actual behavior

 The parameter is incorrect.

[process exited with code 4294967295]

Copying non-ASCII characters from Windows to WSLg broken

Environment

Windows build number: Microsoft Windows [Version 10.0.21364.1]
Your Distribution version: Ubuntu 20.04
Your WSLg version: 1.0.17.1

Steps to reproduce

Try opening notepad.exe and type non-ASCII string. Copy it and try pasting it inside gedit or gvim.

4MnGnQFIFY.mp4

WSL logs:

WSLg ( x86_64 ): 1.0.17+3.Branch.master.Sha.a526dfd5ad03d126bb2d8c528f6c3563e86a40da
Mariner: VERSION="1.0.20210224"
FreeRDP: e4a2fc2053bd8c5f99455fcd08ffee7e5591567a
weston: fd961f5cd116c9358d82ce94d139c1578e21bd00
pulseaudio: 2f0f0b8c3872780f15e275fc12899f4564f01bd5
mesa:

Expected behavior

Copying non-ASCII characters between Windows and WSLg should work

Actual behavior

In this example I am copying a string "ááá" from notepad.exe to gedit and gvim. In both cases gedit and gvim seem to expect UTF-8 encoded data but it looks like they receive ISO-8859-1 (latin1) where "á" is encoded as 0xE1.

GUI apps hang up on start when `/etc/wsl.conf` has `root=/`

Environment

Windows build number: 10.0.21364.0
Your Distribution version: Ubuntu 20.04
Your WSLg version: I don't have 'Windows Subsystem for Linux GUI app support', but I do have this: 

image

Steps to reproduce

  1. Set host mount point to root: /etc/wsl.conf -> [automount] -> root=/
  2. Enable WSLg:
    • Remove guiApplications=false from .wslconfig
    • wsl --shutdown
  3. Run any GUI app.
    • In my example I use gnome-system-monitor and firefox, but it also works with everything else I tried.

WSL logs:

  • Attach WSLg logs from /mnt/wslg
    • I don't have a /mnt/wslg directory, which I'm assuming is because I changed the host mount point from /mnt to /.
    • I do indeed have a /wslg directory, but it's empty.

Expected behavior

The app should start normally and display a window. See below a recording of how that happens with VcXsrv.

Actual behavior

  1. The app doesn't print any errors.
  2. But it also doesn't print any of its normal output, which would indicate that it's working, but invisible.
  3. No new windows appear on the screen.
  4. No second instance of vmmem in the process list (as reported by Windows Task Manager).
    • I'm assuming a second instance of vmmem should appear, because the docs say the whole thing works by starting a second WSL2 distro.
  5. DISPLAY and WAYLAND_DISPLAY variables are present and look fine.

Issue in WSLg

doesnt

Working normally via VcXsrv

works

WSLg windows do not work with window-snapping (to sides or quarters)

Environment

Windows build number:  10.0.21364.0
Your Distribution version: Ubuntu 20.04 (seems to be distro agnostic however)
Your WSLg version: 10.0.17.1

Steps to reproduce

  1. Open any window under WSLg, I have tried xterm, thunar, gvim and firefox so far
  2. Attempt to snap the window with any of: dragging window to an edge of the display; hitting win-left or win-right; or snap some other window

Expected behavior

The window snaps to the side indicated, or in the case of snapping another window appears in the list of windows available to be snapped to the remaining space.

Actual behavior

The window stays where it is, or in the case of snapping another window the WSLg window does not appear in the list of windows available to use the remaining space.

Init /tmp/.X11-unix is overwritten by mounts

The init order seems to process the creation of /tmp/.X11-unix before processing /etc/fstab. This conflicts with an tabs which set /tmp to be a tmpfs (as is fairly common).

More information in: #19 (comment)

Example /etc/fstab:

tmpfs /tmp tmpfs rw,nodev,nosuid,size=2G 0 0

Taking a screenshot of an app using 3D acceleration will cause the window to hang

Environment

Windows build number: 10.0.21364.0
Your Distribution version: Ubuntu 20.04
Your WSLg version: 1.0.17.1

Steps to reproduce

  1. Install Ubuntu
  2. run apt install -y mesa-utils
  3. execute glxgears
  4. press win+shift+s to open the snipping tool overlay
  5. choose "Window" from the toolbar at the top of your display
  6. select the glxgears window (with the 3-dimensional view of rotating gears, not the terminal) to take a screenshot
  7. Observe that the window hangs and cannot be closed and vmmem uses up all ram available to it (on my system with 32GB of ram vmmem balloons to using ~16GB)

WSL logs:

Expected behavior

The app should continue functioning and not hang the entire WSL GUI

Actual behavior

The WSL GUI hangs and weston spins it's wheels with the following line added to weston.log repeatedly until out of tmpfs space:

[00:36:33.391] RDP clipboard_data_source_write: write failed (Resource temporarily unavailable)

non-Latin characters can't be displayed correctly in window title

Environment

Windows build number: 21340
Your Distribution version: Ubuntu
Your WSLg version: 0.2.13

Steps to reproduce

Install any application can display non-Latin characters to window title, such as Spotify.
(In this repro step, Spotify is used)
Install Spotify
Launch Spotify
Select song/artist which include non-Latin characters.
Window title should show song/artist name, but when those contains non-Latin characters, it shows as "box".

image

Expected behavior

non-Latin characters should be shown correctly.

No audio

Environment

Windows build number: Microsoft Windows [Version 10.0.21364.1
Your Distribution version: Release:        16.04
Your WSLg version: 1.0.17.1

Steps to reproduce

install vlc - sudo apt install vlc -y
vlc

VLC media player 2.2.2 Weatherwax (revision 2.2.2-0-g6259d80)
shm_open() failed: No such file or directory
[00000000013a9dd8] pulse audio output error: PulseAudio server connection failure: Protocol error
[00000000012af148] core libvlc: Running vlc with the default interface. Use 'cvlc' to use vlc without interface.
QObject::~QObject: Timers cannot be stopped from another thread
luke@duskwood:~$ uname -a
Linux duskwood 5.10.16.3-microsoft-standard-WSL2 #1 SMP Fri Apr 2 22:23:49 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

WSL logs:

  • Attach WSLg logs from /mnt/wslg

You can access the wslg logs using explorer at: \\wsl\<Distro-Name>\mnt\wslg (eg: \\wsl\Ubuntu-20.04\mnt\wslg)

  • puseaudio.log
    *E: [pulseaudio] module-console-kit.c: GetSessionsForUnixUser() call failed: org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.ConsoleKit was not provided by any .service files
    E: [pulseaudio] module.c: Failed to load module "module-console-kit" (argument: ""): initialization failed.
    E: [rdp-sink] module-rdp-sink.c: RDP Sink - Trying to connect to /mnt/wslg/PulseAudioRDPSink
    E: [rdp-sink] module-rdp-sink.c: RDP Sink - Connected to fd 19

  • weston.log
    weston.log

  • versions.txt
    WSLg ( x86_64 ): 1.0.17+3.Branch.master.Sha.a526dfd5ad03d126bb2d8c528f6c3563e86a40da
    Mariner: VERSION="1.0.20210224"
    FreeRDP: e4a2fc2053bd8c5f99455fcd08ffee7e5591567a
    weston: fd961f5cd116c9358d82ce94d139c1578e21bd00
    pulseaudio: 2f0f0b8c3872780f15e275fc12899f4564f01bd5
    mesa:

Expected behavior

Actual behavior

xmag doesn't work

Environment

Your Distribution version: Ubuntu
Your WSLG version: 0.2.9

Steps to reproduce

run xmag

Note:

Same issue repro with Ubuntu in Wayland mode. Ubuntu in X11 mode works fine. Given our WSLg is always work in Wayland mode. This has to be fixed in Wayland globally.

cut and paste does not work

Environment

[Version 10.0.21364.1] Ubuntu 20.4

Windows build number: [run `[Environment]::OSVersion` for powershell, or `ver` for cmd]
Your Distribution version: [On Debian or Ubuntu run `lsb_release -r` in WSL]
Your WSLg version: [Open 'Apps and Features' and check the version of 'Windows Subsystem for Linux GUI app support', e.g: 0.2.3.13]

Steps to reproduce

Opened these wsl instructions in Windows EdgeDev. marked and copied command.
Went to Ubunto shell.
command V just prints out ^V
But the top-left menu edit paste works. It say

WSL logs:

  • Attach WSLg logs from /mnt/wslg

You can access the wslg logs using explorer at: \\wsl\<Distro-Name>\mnt\wslg (eg: \\wsl\Ubuntu-20.04\mnt\wslg)

  • puseaudio.log
  • weston.log
  • versions.txt

Expected behavior

Actual behavior

android studio: opening drop down menu makes main window title bar grayed (deactivate)

Environment

Windows build number: 21340
Your Distribution version: Ubuntu
Your WSLg version: 0.2.13

Steps to reproduce

Install android studio 4.1.3 (or any version)
Launch android studio
Click any drop down menu, such as File, Edit, View.
Main window title bar grayed out, same as deactivated.

image

Expected behavior

Main window title bar remain unchanged.

image

Add support for OpenCL

Is your feature request related to a problem? Please describe.
The tested app is Unity 3D editor. Some of the features (such as on-GPU Lightmap computing) work by leveraging OpenCL. Unfortunately it seems wslg does not (yet) support exposing a device OpenCL can take advantage of.

Describe the solution you'd like
Have the same "it just works" experience as with OpenGL acceleration with OpenCL

Additional context
image

GIMP icon is rendered incorrectly in the task bar

Environment

Windows build number: 21362
Your Distribution version: Ubuntu 20.04
Your WSLg version: 1.0.17

Steps to reproduce

sudo apt install gimp
gimp

WSL logs:

  • Attach WSLg logs from /mnt/wslg

pulseaudio.log
versions.txt
weston.log

Expected behavior

GIMP Icon rendered correctly in both start menu and task bar.

Icon in the start menu looks correct:
image

Actual behavior

GIMP Icon incorrectly rendered in task bar.

image

MSI title is shown incorrectly when uninstalling

Environment

0.2.7.2 (An older MSI)

Steps to reproduce

Uninstall the MSI and see an image like this:
image

This was reported by Paul Campbell but I was unable to exactly repro it on 0.2.10. Perhaps this is a no repro, but wanted to file it just to be sure.

Attempting to run GUI apps returns an error

Environment

Windows build number: Microsoft Windows [Version 10.0.21364.1]
Your Distribution version: Ubuntu 20.04
Your WSLg version: 1.0.17.1

Steps to reproduce

  1. Update to Windows build 21364.
  2. Install special NVIDIA 470.14 driver.
  3. Run wsl --update.
  4. Reboot.
  5. Create new Ubuntu 20.04 WSL2 instance.
  6. Install GUI applications (x11-apps, Chrome, etc.).
  7. Attempt to run the applications.

WSL logs:

pulseaudio.log
weston.log
versions.txt

Expected behavior

GUI applications should open when run.

Actual behavior

Attempting to launch from the CLI returns the error: Error: Can't open display: :0.

Does not work with Open SUSE LEAP 15.2

Is your feature request related to a problem? Please describe.
C:\WINDOWS\system32>wsl.exe --list --online
The following is a list of valid distributions that can be installed.
Install using 'wsl --install -d '.

NAME FRIENDLY NAME
Ubuntu Ubuntu
Debian Debian GNU/Linux
kali-linux Kali Linux Rolling
openSUSE-42 openSUSE Leap 42
SLES-12 SUSE Linux Enterprise Server v12
Ubuntu-16.04 Ubuntu 16.04 LTS
Ubuntu-18.04 Ubuntu 18.04 LTS
Ubuntu-20.04 Ubuntu 20.04 LTS

Describe the solution you'd like
A clear and concise description of what you want to happen.
The SUSE Leap 42 listed is ancient and unsupported for security patches
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
I hate Ubuntu distros!
Additional context
Add any other context or screenshots about the feature request here.

Unigine Heaven crashes

Environment

Windows build number: 10.0.21364.1
Your Distribution version: Ubuntu 21.04
Your WSLg version: 1.0.17.1

Steps to reproduce

Install Unigine Heaven 4.0 and run it.

https://benchmark.unigine.com/heaven

WSL logs:
wslglogs.zip

  • Attach WSLg logs from /mnt/wslg

wslg_logs.zip

Expected behavior

The benchmark starts and runs.

Actual behavior

The program crashes and reports:

Received signal SIGSEGV, invalid memory reference

Selecting the lowest quality settings and resolution (windowed) enables Heaven to run occasionally. Sometimes it too crashes with SIGSEGV.

`Loading "/home/user/.Heaven/heaven_4.0.cfg"...
Loading "libGPUMonitor_x64.so"...
Loading "libGL.so.1"...
Loading "libopenal.so.1"...
Set 640x360 windowed video mode
NVD3D10: CPU cyclestats are disabled on client virtualization
NVD3D10: CPU cyclestats are disabled on client virtualization
Set 1.00 gamma value
Unigine engine http://unigine.com/
Binary: Linux 64bit GCC 4.4.5 Release Feb 13 2013 r11284
Features: OpenGL OpenAL XPad360 Joystick Flash Editor
App path: /mnt/c/Users/tnatk/Downloads/Unigine_Heaven-4.0/bin/
Data path: /mnt/c/Users/tnatk/Downloads/Unigine_Heaven-4.0/data/
Save path: /home/user/.Heaven/

---- System ----
System: Linux 5.10.16.3-microsoft-standard-WSL2 x86_64
CPU: AMD Ryzen 9 3900X 12-Core Processor 3792MHz MMX+ SSE SSE2 SSE3 SSSE3 SSE41 SSE42 SSE4A AVX HTT x24
GPU: Unknown GPU x1
System memory: 64272 MB
Video memory: 256 MB
Sync threads: 23
Async threads: 24

---- MathLib ----
Set SSE2 simd processor

---- Sound ----
Renderer: OpenAL Soft
OpenAL vendor: OpenAL Community
OpenAL renderer: OpenAL Soft
OpenAL version: 1.1 ALSOFT 1.19.1
Found AL_EXT_LINEAR_DISTANCE
Found AL_EXT_OFFSET
Found ALC_EXT_EFX
Found EFX Filter
Found EFX Reverb
Found EAX Reverb
Found QUAD16 format
Found 51CHN16 format
Found 61CHN16 format
Found 71CHN16 format
Maximum sources: 256
Maximum effect slots: 16
Maximum auxiliary sends: 2

---- Render ----
GLRender::GLRender(): Unknown NVidia GPU
OpenGL vendor: Microsoft Corporation
OpenGL renderer: D3D12 (NVIDIA GeForce RTX 3070)
OpenGL version: 3.3 (Core Profile) Mesa 21.0.1
OpenGL flags: Core Profile
Found required GL_ARB_map_buffer_range
Found required GL_ARB_vertex_array_object
Found required GL_ARB_draw_instanced
Found required GL_ARB_draw_elements_base_vertex
Found required GL_ARB_transform_feedback
Found required GL_ARB_half_float_vertex
Found required GL_ARB_half_float_pixel
Found required GL_ARB_framebuffer_object
Found required GL_ARB_texture_multisample
Found required GL_ARB_uniform_buffer_object
Found required GL_ARB_geometry_shader4
Found optional GL_ARB_blend_func_extended
Found optional GL_ARB_shader_bit_encoding
Found optional GL_EXT_texture_compression_s3tc
Found optional GL_ARB_texture_compression_rgtc
Shading language: 3.30
Maximum texture size: 16384
Maximum texture units: 160
Maximum texture renders: 8

---- Physics ----
Physics: Multi-threaded

---- PathFind ----
PathFind: Multi-threaded

GPUMonitorPlugin::init(): can't initialize GPUMonitor
EnginePlugins::init(): can't initialize "GPUMonitor" plugin
---- Interpreter ----
Version: 2.52`

Cannot copy text *into* Kate editor, copying text *from* Kate works fine.

Environment

Windows build number: Microsoft Windows NT 10.0.21257.0
Your Distribution version: Ubuntu 20.04 LTS
Your WSLG version: 0.2.9.0

Steps to reproduce

  • Open kate
  • Open notepad (for verification)
  • Copy text in windows.
  • Paste in notepad (for verification)
  • try paste in kate -> no text pasted
  • copy text inside kate
  • Paste in notepad -> this direction works fine.

WSL logs:

  • Attach WSLg logs from /mnt/wslg

You can access the wslg logs using explorer at: \\wsl\<Distro-Name>\mnt\wslg (eg: \\wsl\Ubuntu-20.04\mnt\wslg)

  • puseaudio.log
  • weston.log
  • versions.txt

versions.txt is not copyable (missing permissions):
WSLG ( x86_64 ): 0.2.9+Branch.master.Sha.d49cb28cbf4be209347e3b48315081c1b38e4465
wayland: 8cd7c836eaceccc0e4ada7bdac43d86bfe3e0a0a
FreeRDP: 297cb96a30ed00e1d7cba1ae9035cfeff82dbfd6
weston: a17db71354ad1c453e10a15805d907c52425499c
pulseaudio: 2f0f0b8c3872780f15e275fc12899f4564f01bd5
sharedguestalloc: e2895c6a49105caaa651c05d4b96a46e5a621538

pulseaudio.log
weston.log

Expected behavior

copy/past of text works both directions

Actual behavior

can only copy text from linux to windows, but not other way round

IME flyout window is far away from application window (DPI issue?)

Environment

Windows build number: 10.0.21331.1000 rs_prerelease arm64
Your Distribution version: Ubuntu 20.04
Your WSLG version: 0.2.13

Steps to reproduce

  1. Pick up a device with HiDPI monitor without vGPU driver installed, e.g. Surface Pro X
  2. Install IME package ibus, ibus-pinyin; Install random app like gedit
  3. Configure ibus in IBus Preferences, confirm to start IBus daemon, add Chinese/Pinyin input method, configure IME switch key to avoid collision with Windows, keep the window open to keep IBus daemon open

ibus
pinyin

  1. In another WSL window, start gedit: GTK_IM_MODULE=ibus gedit
  2. Switch to IME, type something, watching the IME candidate flyout window going randomly everywhere.

WSL logs:

Expected behavior

It should follow text in the editor as usual. For example:
image

Actual behavior

The IBus candidate selection flyout window goes everywhere. Also app is in 200% scale while the IME is 100%.

Screenshot (4)

Screenshot (5)

Linux GUI apps not showing up in Start Menu

(Submitting this separately from #4 because I don't believe it to be the same issue as #4.)

Environment

Windows build number: 21365
Your Distribution version: Debian 11 (bullseye/sid) / Ubuntu 20.04
Your WSLg version: 1.0.17.1

Steps to reproduce

Unknown (should be automatic, I believe?).

I have been using GUI apps on the former distribution for some time before WSLg was released; the latter distribution was a fresh install. In neither case have the Linux GUI apps showed up in the Start menu, and I can confirm that in both cases definition files exist for them under /usr/share/applications.

WSL logs:

Expected behavior

Icons representing the Linux GUI apps should show up in a distro-specific folder, per this repo's README.

Actual behavior

No such icons appear.

IME (Input Method Editor) Support

WSLg should implement IME support for CJK locale scenarios. Currently, the WSLg & WSL architecture can support existing Linux IME facilities (e.g. ibus) as tested, however, manual configuration and startup is required.

Solution
An ideal solution should reuse the Windows IME infrastructure and transport the input content to Linux window for the best experience. However, this might needs much engineering effort.

Alternative Solutions
Alternatively, WSLg can start the IME daemon and configure required environment variables (e.g. QT_IM_MODULE, IBUS_USE_PORTAL, GTK_IM_MODULE and such) without manual steps.

Additional context

  • Having proper IME support is almost a must-need for CJK locale users.
  • IME input flyout locations might need to be validated, but so far looks okay (60%) to me when using IBUS on WSLg. Update: Not really. Layout bug: #8

[Help wanted] Default window decorations color

Big chance its not WSLg issue, but maybe somebody will able to tell where to look:

Most apps respect current GTK_THEME and use window decorations from it. But some, most important JetBrains IDEs won't and for example xcalc.

What part of this magic system is responsible to choose what window decoration theme to use? Can i force it to use some dark theme by default?

win-decorations

Can't connect to X11 window server using ':0.0'

Environment

Windows build number: 10.0.21364.1
Your Distribution version: Debian 10
Your WSLg version: 1.0.17.1

Steps to reproduce

Install webstorm or gimp.

Expected behavior

Application displayed on windows.

Actual behavior

The program crashes and reports:

webstorm
java.awt.AWTError: Can't connect to X11 window server using ':0.0' as the value of the DISPLAY variable.
gimp
Cannot open display:

I also tried with different DISAPLY variables, disable it and … .

Other applications like gedit and Volume Control works as expected.

Too aggressive downwards scrolling, and resists upwards scrolling

Environment

Windows build number: 21364.1
Your Distribution version: Ubuntu 20.10
Your WSLg version: unknown

Steps to reproduce

  1. apt install firefox -y (or epiphany-browser or nautilus)
  2. firefox (or epiphany-browser or nautilus)
  3. Visit any tall webpage
  4. Scroll downwards the smallest amount possible
  5. Scroll upwards the smallest amount possible

Expected behavior

It should scroll down by about 40-50px, and up by about 40-50px.

Actual behavior

It scrolls ~2000px downwards per tick. It resists scrolling upwards, and need to repeat it multiple times before it finally scrolls ~10px upwards.

Hardware:

Synaptics Precision TouchPad (Lenovo)

WSL logs:

https://aka.ms/AAc0u5v (feedbackid b6a23cbb-c7f7-4d6e-a2b1-66d85f95bc0c)

Missing pulseaudio-mirror?

It seems that the pulseaudio-mirror repository mentioned in this repo isn't public (or is missing in some other way).

Add support for Vulkan

Is your feature request related to a problem? Please describe.
Currently, trying to run any app leveraging Vulkan seems to end up with a Segfault

Unity with an HDRP (Vulkan dependant) project:
image

vulkaninfo:
image

Describe the solution you'd like
Having Vulkan work out of the box just like OpenGL

GUI windows are not handled by PowetToys

At this moment, GUI windows from WSL2 are handled in a way that makes them not handled by e.g. PowerToys which in result makes it impossible to properly tile windows etc.
Is it possible to change this behaviour?

Is it possible to start gui app in windows with scale factor

Is your feature request related to a problem? Please describe.
I'm always frustrated when the I start linux gui applications from start menu in windows without scaling factor. In wsl, once

export QT_SCALE_FACTOR=2
export GDK_SCALE=2

are set, gui apps (for example gvim) can start with factor. But in windows, can't start with scaling factor.
image

Describe the solution you'd like
A clear and concise description of what you want to happen.

add an cmd line option to start app with scaling factor so I can change the shortcut C:\Windows\System32\wslg.exe ~ -d openSUSE-Tumbleweed gvim -f

Additional context
Add any other context or screenshots about the feature request here.

After most recent WSL update, WSL won't start

Environment

Windows build number: 10.0.21364.0
Your Distribution version: Ubuntu 18.04
Your WSLg version: 1.0.17.1
WSL Update Version: 5.10.16

Steps to reproduce

  1. Update WSL to support WSLg
  2. Run the distro

WSL logs:

wsl.zip

Expected behavior

WSL should start

Actual behavior

WSL fails to start with:

The parameter is incorrect.

[process exited with code 4294967295]

The solutions is to disable WSLg as per: microsoft/WSL#6839 by disabling it in .wslconfig file via

[wsl2]
guiapplications=false

Strange XFCE panel behavior

Environment

Windows build number: 21364.1
Your Distribution version: Arch (up to date)
Your WSLg version: 1.0.17.1

Steps to reproduce

When I was using x410 I had set up an xfce4 panel to house all my commonly used GUI apps. I have a script that launches xfce4 panel.

xfce4-panel --sm-client-disable --disable-wm-check &> /dev/null

If I unlock an existing panel and attempt to drag it to a new position on the screen it does not move, though the "drag" icon appears properly.

WSL logs:

weston.log

Expected behavior

I expect the xfce panel to retain its position on launch and be able to be moved when unlocked.

Actual behavior

The panel still appears when launched but its position seems to change every launch and when unlocked and I cannot drag it to a new position.

image

[not a bug] Star count?

(This is not a bug—I just couldn't find a good issue template.)

Could anyone give me a hint as to why this repo is getting so many stars? Almost every time I reload the page, it has new stars. It had only 100 stars about 4 or 5 hours ago when I starred it 🤔

I can see that it's a cool product and lots of people like it. But—that's all?

How do people know about it so soon? This repo was created (or made public, or whatever) 2 days ago, and it's getting quite popular 🔥

(Sorry if this is a dumb question, I'm just confused+curious :)

[Help wanted] How to scale the apps?

I have an 2560x1440 screen, and have these in my .zshrc

export QT_SCALE_FACTOR=2
export GDK_SCALE=2

But some apps still look small. Eg. mousepad. How can I make them scale?

My distro is Manjaro, with xfce4 installed.

WSLg

Apps start lightening fast Windows start menu, but from Ubuntu command line will only start intermittently: gedit has only started for me a few times.

Lower FPS than expected through WSLg

the gui apps seems to be at fixed 30fps(or 32fps like windows rdp default ).
is there something like DWMFRAMEINTERVAL on windows rdp server to change the fps?

Evaluate user profile before starting GUI apps from windows start menu

Is your feature request related to a problem? Please describe.
I am using kdevelop IDE and I need to set the environment variable KDEV_CLANG_BUILTIN_DIR for it to work properly (find the correct clang installation). The environment variable is set in system wide /etc/profile, but is ignored when launching the app from the start menu shortcut. When launching the app through WSL console manually it works fine (because shell evaluates /etc/profile).

Regular Linux desktops do not have this difference in behavior, starting apps from icons on the desktop or start menu has a proper environment (presumably because the parent process was launched by passing the command through "bash --login" or something similar.

Describe the solution you'd like
A linux application launched through the start menu should have the same initial environment as the one I get inside the shell I get when executing "wsl" in windows.

Describe alternatives you've considered
In my case I can change the location the environment is configure to make it so that init picks it up, but that requires superuser powers. Regular users will not always be able to do that, or will be confused because application installation/configuration documentation will not work as expected.

Additional context
Add any other context or screenshots about the feature request here.

Unable to start windows manager

Environment

Windows build number: Microsoft Windows [Version 10.0.21364.1]
Your Distribution version: Ubuntu 20.04
Your WSLg version: 1.0.17.1

Steps to reproduce

Start bspwm tiling windows manager in command line
$bspwm

Expected behavior

Start new bspwm session

Actual behavior

Another window manager is already running.

Xwayland crash, signal 6

Environment

Windows build number: Microsoft Windows [Version 10.0.21349.1000]
Your Distribution version: Ubuntu 20.04
Your WSLg version: 0.2.15

Steps to reproduce

Run emacs and edit code for a while. Emacs window eventually disappeared, with dmesg containing:
weston.log
pulseaudio.log

[23485.764003] potentially unexpected fatal signal 6.
[23485.764008] CPU: 0 PID: 441 Comm: Xwayland Not tainted 5.4.91-microsoft-standard-WSL2 #1
[23485.764083] RIP: 0033:0x7f25d0e62115
[23485.764087] Code: c2 b8 ea 00 00 00 0f 05 48 3d 00 f0 ff ff 77 3d 41 89 c0 41 ba 08 00 00 00 31 d2 4c 89 ce bf 02 00 00 00 b8 0e 00 00 00 0f 05 <48> 8b 84 24 08 01 00 00 64 48 33 04 25 28 00 00 00 75 24 44 89 c0
[23485.764092] RSP: 002b:00007ffca8ab9230 EFLAGS: 00000246 ORIG_RAX: 000000000000000e
[23485.764096] RAX: 0000000000000000 RBX: 0000559b448809f0 RCX: 00007f25d0e62115
[23485.764098] RDX: 0000000000000000 RSI: 00007ffca8ab9230 RDI: 0000000000000002
[23485.764101] RBP: 0000559b437ce43e R08: 0000000000000000 R09: 00007ffca8ab9230
[23485.764103] R10: 0000000000000008 R11: 0000000000000246 R12: 00007ffca8ab94c0
[23485.764105] R13: 00007ffca8ab9890 R14: 00007ffca8ab9968 R15: 00007ffca8ab988c
[23485.764108] FS: 00007f25d07f3440 GS: 0000000000000000

WSL logs:

  • Attach WSLg logs from /mnt/wslg

You can access the wslg logs using explorer at: \\wsl\<Distro-Name>\mnt\wslg (eg: \\wsl\Ubuntu-20.04\mnt\wslg)

  • puseaudio.log
  • weston.log
  • versions.txt

$ sudo cat /mnt/wslg/versions.txt
[sudo] password for shacharr:
WSLg ( x86_64 ): 0.2.15+Branch.master.Sha.0f60d20b141a4bd39162b6e2e9f5ff3a074d1d06
Mariner: VERSION="1.0.20210224"
FreeRDP: 000d25814f3e48b6c3c0e524d8eb21ed819519fb
weston: bbdc70a6d800a0deb29c728703e3c056c2c24222
pulseaudio: 2f0f0b8c3872780f15e275fc12899f4564f01bd5
mesa:
sharedguestalloc: ebd000e3cb2649b7c28d1b71f76d43f592b45a61

Expected behavior

No crash

Actual behavior

Xwayland crush, much sadness ensued

Window chrome does not reflect focus state

Environment

Windows build number: Microsoft Windows [Version 10.0.21364.1]
Your Distribution version: Ubuntu 20.04
Your WSLg version: 1.0.17.1

Steps to reproduce

Open a GUI program. Notice that when focusing another window the window chrome/decorations for the WSL app do not fade or indicate non-focus.

Expected behavior

The window decorations should reflect the window's focus state.

Actual behavior

Focused and unfocused windows appear visually the same.

steam: menu can't be selected by mouse, but can be selected by keyboard

Environment

Windows build number: 21340
Your Distribution version: Ubuntu
Your WSLg version: 0.2.13

Steps to reproduce

Install steam
Launch steam
Open STORE (or any) drop down menu by mouse
Selected FEATURED (or any) and click.
The main window pane doesn't switch to selected contents.

image

Expected behavior

The main window pane switch to selected contents.

If menu item is selected by keyboard enter key, instead of mouse click, window correctly switch to selected contents.

Electron apps look pixelated at 200% resolution

Environment

Windows build number: 10.0.21343.1000 (Dev Channel)
Your Distribution version: Ubuntu 20.04
Your WSLg version: 0.2.14

Steps to reproduce

  1. Set display to 200% resolution. Repo via Windows VM and macOS Remote Desktop client (Optimize for Retina display).
  2. Install Node.js 15.x in WLS
  3. git clone https://github.com/electron/simple-samples
  4. cd simple-samples/activity-monitor
  5. npm install
  6. npx electron .

WSL logs: @craigloewen-msft

Expected behavior

App renders in high resolution:
ubuntu-screenshot

Actual behavior

App renders pixelated with different chrome:
wsgl-screenshot

Invalid command line option: --update

When running "wsl --update," I get the following error:

Invalid command line option: --update

I am running the latest version of Windows 10 Home and WSL 2.

Invalid command line option

I have an existing WSL2 installation of Ubuntu 20.04. On running wsl --update on Administrator: Command Prompt, it gave this error:

Microsoft Windows [Version 10.0.19042.928]
(c) Microsoft Corporation. All rights reserved.

C:\WINDOWS\system32>wsl --list -v
  NAME            STATE           VERSION
* Ubuntu-20.04    Stopped         2

C:\WINDOWS\system32>wsl --update
Invalid command line option: --update
Copyright (c) Microsoft Corporation. All rights reserved.

System Specifications

OS:              Windows 10
Distributor ID:  Ubuntu
Description:     Ubuntu 20.04.2 LTS
Release:         20.04
Codename:        focal
Python:          Python 3.8.8
pip:             21.0.1

$ uname -a: Linux 5.4.72-microsoft-standard-WSL2 #1 SMP Wed Oct 28 23:40:43 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

WSLg does not seem to support fractional scaling

Environment

Microsoft Windows [Version 10.0.21364.1] 
kali-linux 2021.1
1.0.17.1]

Steps to reproduce

Set display scaling to 150%. Open a graphical application on that monitor (or move it to that monitor).

Expected behavior

The application scales according to the windows display scaling settings.

Actual behavior

wslg only seems to support 100% and 200% as display scales.

Pop up Windows sometimes aren't shown correctly

Environment

Windows build number: 21298 rsmaster
Your Distribution version: Ubuntu 20.04
Your WSLG version: 0.2.11

Steps to reproduce

  • Install gitkraken (I used the download link and installed the .deb https://www.gitkraken.com/download )
  • Run gitkraken
  • Open a repository by clicking 'Browse' but do not select one
  • Navigate away from the Window and open other Windows infront of it
  • Click on gitkraken again
  • Only the gitkraken window will pop up, and it will be non-interactable. I'd expect the modal Window to pop up too.

Expected behavior

The pop up Window should pop up in place over the git kraken Window.

Actual behavior

The pop up Window remains hidden behind all other Windows, causing the user to go find it before they can go interact with the app again.

gif4

Windows emoji picker (Windows + .) does not seem to cooperate with WSLg

Environment

Windows build number: Microsoft Windows [Version 10.0.21364.1]
Your Distribution version: Ubuntu 20.04
Your WSLg version: 1.0.17.1

Steps to reproduce

Open gedit and press Windows + . to display emoji picker. Switch to symbols and try using EURO symbol "€".

Eecqf0oacv-1.mp4

WSL logs:

WSLg ( x86_64 ): 1.0.17+3.Branch.master.Sha.a526dfd5ad03d126bb2d8c528f6c3563e86a40da
Mariner: VERSION="1.0.20210224"
FreeRDP: e4a2fc2053bd8c5f99455fcd08ffee7e5591567a
weston: fd961f5cd116c9358d82ce94d139c1578e21bd00
pulseaudio: 2f0f0b8c3872780f15e275fc12899f4564f01bd5
mesa:

Expected behavior

I should be able to input EURO symbol using emoji picker.

Actual behavior

Nothing seems to happen.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.