-
Notifications
You must be signed in to change notification settings - Fork 822
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
Windows binaries not in $PATH on fresh wsl2 Debian install #5779
Comments
Similar symptoms on this issue #5296 |
For Debian, /etc/profile contributed to this problem. Here is the path definition in /etc/profile
You can delete above lines, then If you would like to keep these lines, you can also append ":$PATH" to each path like below, then
|
Splains things. But what are we calling this? External? Those lines have been in Debian |
Debian used to have an item in their profile for WSL, looks like they removed it for some reason. More a question for them - @rhaist is that still you?
|
fair 'nuff |
@therealkenc @benhillis I removed the patched profile file in the latest version of Debian because this lead to some other problems with WSL and VSCode. I would suggest that either:
This was the commit for Debian WSL that removed the file. You can restore it from there if you need it @therealkenc: https://salsa.debian.org/debian/WSL/-/commit/7611edba482fd0b3f67143aa0fc1e2cc1d4100a6 |
@rhaist - This is not possible. Processing the profile is something that the shell does, we have no opportunity to edit process environment after we've launched the shell. We set up the path and this line overwrites it. |
@licanhua - I'd suggest deleting the lines rather than appending $PATH. |
@rhaist and @benhillis Can you help to review above docs change? I created a PR to update troubleshooting page |
Could someone please reopen this issue to keep track of the fix? This was the PR by Matheus Castello hinting me that for WSL2 https://salsa.debian.org/debian/WSL/-/merge_requests/2 I will search for another clear identifier and publish an update for the App. |
@microhobby's patch looks about right. There is no need to runtime test for WSL because in the context (the launcher App) you're on WSL by definition. |
By removing those line you end up with the vanilla |
@rhaist as the users in the case of WSL distros assume that this path already has the Windows path appended, I would think it would be better to apply my patch, so we cover this case and the case of a custom kernel without "microsoft" in the CONFIG_LOCAL_VERSION with no further configuration by the end-user. |
@rhaist maybe another solution:
then we can try to submit this change in mainline and use it in the Debian vanilla ... |
@rhaist The best now, in my view, would be to revert the commit that removes the custom profile and use the solution above. And later check the case of the changes in the profile of vanilla. I opened a pull request with this: |
It would be great if vanilla Debian The [Trivia: If you |
There are doc PRs in the pipe here and here. TL;DR, if you have the following lines in
More discussion can be had over in the discussion forum. |
Environment
Steps to reproduce
Expected behavior
Windows binaries are in the
$PATH
Actual behavior
No windows locations in
$PATH
Note
I recently installed another machine with Debian/buster WSL by first install on WSL1 and converting to WSL2 and the correct windows locations were found which makes me suspicious this may be related to not first going through WSL1 conversion process?
The text was updated successfully, but these errors were encountered: