Skip to content

WSLDVCPlugin sets unquoted wslg.exe path in PKEY_AppUserModel_RelaunchCommand, breaking "Pin to taskbar" #1530

Open

Description

Windows build number:

10.0.22631.7652

Your Distribution version:

Fedora Linux 41

Your WSL versions:

WSL version: 3.0.3.0
Kernel version: 6.18.54.1-1
WSLg version: 1.0.79
MSRDC version: 1.2.7391
Direct3D version: 1.611.1-81528511
DXCore version: 10.0.26100.1-240331-1435.ge-release
Windows version: 10.0.22631.7652

Steps to reproduce:

  1. Launch any Linux GUI application that has a valid .desktop entry and icon in /usr/share/applications or /usr/local/share/applications so WSLDVCPlugin associates the window (OnAssociateWindowId -> UpdateTaskBarInfo).
  2. Right-click the running application's icon on the Windows taskbar and click Pin to taskbar.
  3. Close the Linux GUI application.
  4. Click the newly pinned taskbar icon.

WSL logs:

No response

WSL dumps:

No response

Expected behavior:

Clicking the pinned taskbar icon launches C:\Program Files\WSL\wslg.exe -d <Distro> --cd "~" -- <Exec> and merges the running window into the pinned taskbar button.

Actual behavior:

Windows displays an error dialog:

Problem with Shortcut
The item 'Program' that this shortcut refers to has been changed or moved, so this shortcut will no longer work properly.

Inspecting the shortcut created by Windows Shell in %APPDATA%\Microsoft\Internet Explorer\Quick Launch\User Pinned\ImplicitAppShortcuts\<hash>\<App> (<Distro>).lnk shows:

  • Target: C:\Program
  • Arguments: Files\WSL\\wslg.exe -d <Distro> --cd "~" -- <Exec>

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions