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

Add support for WSLg #39

Merged
merged 6 commits into from
Mar 24, 2022
Merged

Add support for WSLg #39

merged 6 commits into from
Mar 24, 2022

Conversation

nzbr
Copy link
Member

@nzbr nzbr commented Jul 22, 2021

This PR adds support for WSLg.
GUI Applications can be launched from a shell as well as from the start menu

I added an activation script, that copies the application launchers to /usr/share/applications so that the installed applications will appear in the windows start menu

syschdemd.sh was changed to start /bin/sh as a login shell because the environment variables aren't present otherwise

@nzbr
Copy link
Member Author

nzbr commented Aug 3, 2021

The solution proposed in #40 sounds more future-proof than this one. The activation script would still be needed for the start menu application launchers to work though

@nzbr
Copy link
Member Author

nzbr commented Dec 14, 2021

This PR now includes the changes from #45 instead of hard-coding the environment variables. New changes included here are the customizable mount path for windows drives as well as copying application launchers to /usr/share/applications so that windows creates the appropriate start menu entries

@nzbr nzbr merged commit 2410ab8 into nix-community:main Mar 24, 2022
@nzbr nzbr added the enhancement New feature or request label Mar 24, 2022
@nzbr nzbr deleted the WSLg branch March 24, 2022 21:30
@@ -13,6 +14,9 @@ in
# WSL is closer to a container than anything else
boot.isContainer = true;

# Include Windows %PATH% in Linux $PATH.
environment.extraInit = ''PATH="$PATH:$WSLPATH"'';
Copy link
Member

Choose a reason for hiding this comment

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

That has one downside: It slows down tab completion down tremendously because looking up the windows directories is very very very slow.

See akinomyoga/ble.sh#96 (comment) for some details.

Copy link
Member Author

Choose a reason for hiding this comment

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

From what I understand, this is a problem for all WSL distros. Appending the path can be toggled off with wsl.wslConf.interop.appendWindowsPath = false;. #64 has an option to toggle off the extraInit code

Copy link
Member

Choose a reason for hiding this comment

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

Yes, it is sadly.

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

Successfully merging this pull request may close these issues.

4 participants