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 · 15 comments

Comments

Projects
None yet
8 participants
@123swk123

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 from bash $PATH includes native Windows path(work around "AppendNtPath"=dword:00000000 *N to bash $PATH includes native Windows path(work around "AppendNtPath"=dword:00000000 *Not working*) May 2, 2017

@123swk123

This comment has been minimized.

123swk123 commented May 2, 2017

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

@stehufntdev

This comment has been minimized.

Collaborator

stehufntdev commented May 4, 2017

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

This comment has been minimized.

Member

benhillis commented May 4, 2017

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

This comment has been minimized.

123swk123 commented May 5, 2017

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

@MikeGitb

This comment has been minimized.

MikeGitb commented May 5, 2017

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

@benhillis

This comment has been minimized.

Member

benhillis commented May 5, 2017

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

@MikeGitb

This comment has been minimized.

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

This comment has been minimized.

Member

benhillis commented May 5, 2017

@MikeGitb - be careful what you wish for!

@benhillis

This comment has been minimized.

Member

benhillis commented May 13, 2017

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

@ztolley

This comment has been minimized.

ztolley commented Aug 22, 2017

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

@benhillis

This comment has been minimized.

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.

@yarrgh

This comment has been minimized.

yarrgh commented Nov 21, 2017

@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

This comment has been minimized.

thecodejunkie commented Nov 29, 2017

@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

This comment has been minimized.

mikerockett commented Dec 17, 2017

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

IAL32 pushed a commit to IAL32/myrc that referenced this issue Feb 18, 2018

@ztolley

This comment has been minimized.

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 :)

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