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

bash $PATH includes native Windows path(work around "AppendNtPath"=dword:00000000 *Not working*) #2048

Closed
123swk123 opened this issue May 2, 2017 · 16 comments

Comments

@123swk123
Copy link

123swk123 commented May 2, 2017

in windows insider build: 16184 "AppendNtPath"=dword:00000000 (#1493) is not working.

it still includes the native windows path in bash PATH variable.

@123swk123 123swk123 changed the title bash $PATH includes native Windows path(work around "AppendNtPath"=dword:00000000 *N bash $PATH includes native Windows path(work around "AppendNtPath"=dword:00000000 *Not working*) May 2, 2017
@123swk123
Copy link
Author

"AppendNtPath"=dword:00000000 (#1493) is working for root user.

@stehufntdev
Copy link
Collaborator

Thanks for reporting the issue. There's been some shuffling around of registry key paths and setting for insider builds. Adding @benhillis to comment.

@benhillis
Copy link
Member

There is some feature development in progress so for now I'd suggest manually setting your PATH variable in your .bashrc file to work around this. This will be resolved in a future insider build.

@123swk123
Copy link
Author

yes as workaround I am using the .bashrc file, hope future build fixes this.

@MikeGitb
Copy link

MikeGitb commented May 5, 2017

Would that feature be a gui that allows to enable/disable this behavior?

@benhillis
Copy link
Member

@MikeGitb - yes, either a GUI or a command line tool to toggle this and other configuration options.

@MikeGitb
Copy link

MikeGitb commented May 5, 2017

@benhillis: My post was actually meant half humorous, but that is great to hear! Can't wait for the next Win10 release ;)

@benhillis
Copy link
Member

@MikeGitb - be careful what you wish for!

@benhillis
Copy link
Member

I've checked in a fix for this issue, it will be in an upcoming Insider build.

@ztolley
Copy link

ztolley commented Aug 22, 2017

This was working but I just realised it broken again.
OS Build: 16257.1
ub

@benhillis
Copy link
Member

benhillis commented Aug 22, 2017

@ztolley - Thanks for the reminder. This registry key only applies to the legacy distribution (the one installed by lxrun.exe). With the addition of Store distributions the mechanism was changed to a per-distro setting. There was a plan to add a configuration UI to change various distribution settings but unfortunately that work didn't make the cut for this release. In the meantime there is a global override that you can set to disable appending the NT path for all WSL distributions machine wide:

Create a .reg file with these contents and import it:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LxssManager]
"DistributionFlags"=dword:fffffffd

To turn this behavior back on, remove the registry value. I'll make sure we get this workaround documented before Fall Creator's Update ships.

@trevor-hackett
Copy link

@benhillis Was this ever documented? If so, where is it located at?

Had to do a bunch of searching through older issues to eventually find my way here.

@thecodejunkie
Copy link

@benhillis is the DistributionFlags still working? I've added it (and before that I tried the old AppendNtPath) but still not having any luck

@mikerockett
Copy link

@thecodejunkie – Working on my side with Ubuntu from the store.

@ztolley
Copy link

ztolley commented Mar 3, 2018

I love WSL, but I do feel it needs things like this documented so I don't have to keep coming back this GitHub issue to remember how to do it :)

@cgrebeld
Copy link

Seems like this is still a problem. The registry patch worked.

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

No branches or pull requests

9 participants