Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve WSLg desktop integration #365

Closed
wants to merge 2 commits into from
Closed

Conversation

mprasil
Copy link
Contributor

@mprasil mprasil commented Dec 17, 2023

The problem is that the WSLg layer looks up the *.desktop files in these folders:

  • /usr/share/applications
  • /usr/local/share/applications
  • /var/lib/snapd/desktop/applications
  • /var/lib/flatpak/exports/share/applications

None of which exists in NixOS by default.

This adds a symlink to per-user profile for the default WSL user. With the symlinks in place WSLg can find *.desktop files and show up GUI apps in Windows Start menu.

Symlinking icons also makes sure correct icons appear for the Start menu entries and running apps.

This resolves #362

Note that AFAIK the WSLg applications folder discovery happens just after start of the WSL distribution, so this might require WSL restart after this has been applied for WSLg to pick up the folders/apps.

The problem is that the WSLg layer looks up the *.desktop files in these
folders:

* /usr/share/applications
* /usr/local/share/applications
* /var/lib/snapd/desktop/applications
* /var/lib/flatpak/exports/share/applications

None of which exists in NixOS by default.

This adds a symlink to per-user profile for the default WSL user. With
the symlinks in place WSLg can find *.desktop files and show up GUI apps
in Windows Start menu.

Symlinking icons also makes sure correct icons appear for the Start menu
entries and running apps.

This resolves nix-community#362
Copy link
Member

@SuperSandro2000 SuperSandro2000 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

didn't try it out but sounds logical to me

modules/systemd/default.nix Outdated Show resolved Hide resolved
Co-authored-by: Sandro <[email protected]>
@mprasil
Copy link
Contributor Author

mprasil commented Dec 18, 2023

@SuperSandro2000 you're right, that implementation actually solves this problem even though it's still broken for me. But I think I know why and will submit separate PR to fix it.

Edit: #368

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

WSLg desktop integration does not show apps in Start menu and correct icons for GUI apps
2 participants