-
Notifications
You must be signed in to change notification settings - Fork 265
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
Support WSL mount options with vscode remote #2126
Comments
I have the same problem. It comes from my custom wsl.conf options: [automount] With the default settings all files in the windows filesystem are executable. With this wsl configuration they are not (I need it for git). vscode should rather call /usr/bin/env sh /path/to/wslServer.sh instead of running wslServer.sh directly. Then it could chmod +x all files in the scripts directory. Regards |
sudo chmod +x * on scripts directory (/.vscode-insiders/extensions/ms-vscode-remote.remote-wsl-0.42.0/scripts/) works for me, thanks. Regards |
@bastian-af But you have to run this on every update of the extension... Please reopen it |
I have the same configuration, I think this fmask setting is quite standard, it should be supported by the extension. |
Hey there, thanks for opening this issue. Are you still experiencing this problem? If so, it might make sense to change the title of the issue to something a bit more specific to what appears to be the request here. Thank you! 😄 |
@bamurtaugh A better title would be something like "Support WSL mount options with vscode remote" The reason for the wsl.conf is to have a better linux like feeling accessing files on the windows file system. Also some linux applications require specific restrictive permissions on files. I think the change is quite minor, because vscode just have to run a bash -c 'chmod +x /path/to/scripts/*' before running the vscode server, OR run the first script with bash /path/to/scripts/script.sh and then the script itself can run chmod +x /path/to/scripts/* |
@bamurtaugh Oh, I forgot to say that I still have this issue with the latest version after every update of the wsl remote. |
@jabdr Thanks for the additional info! Your title suggestion makes sense, so I adjusted the name accordingly to help with issue tracking. |
The title should include keyword "metadata". |
Any update to this? :) |
Still no fix for this? |
Can confirm that this is still happening by setting |
Came here after setting my wsl automount's fmask to a saner default than "everything executable" and yeah, it's a really simple fix for the extension, remove # replace
C:\windows\System32\wsl.exe -d RockyLinux8 sh -c '"$VSCODE_WSL_EXT_LOCATION/scripts/wslServer.sh" x stable code-server .vscode-server --host=127.0.0.1 --port=0 --connection-token=x --use-host-proxy --without-browser-env-var --disable-websocket-compression --accept-server-license-terms --telemetry-level=all'
# with
C:\windows\System32\wsl.exe -d RockyLinux8 sh -- "$VSCODE_WSL_EXT_LOCATION/scripts/wslServer.sh" x stable code-server .vscode-server --host=127.0.0.1 --port=0 --connection-token=x --use-host-proxy --without-browser-env-var --disable-websocket-compression --accept-server-license-terms --telemetry-level=all Same for the content of that script, replace |
@bendem where can I find the launch command to alter? Sidenote: @bamurtaugh I would suggest labeling this as a bug. The issue prevents WSL extension from working. |
I had to dig through logs and code to find it and I forgot how. It's more of a note to the devs than a workaround aimed at users. The fix is really simple on their side, pass the script to bash directly instead of relying on it being executable. I'm not sure what's taking so long unless no dev actually ever looked at this issue. |
Works for me too, but I have to do that every time the WSL extension is upgraded. Quite an inconvenience, mildly speaking. Thanks MS, but no, I'll better use Linux over SSH. WSL2 integration with VSCode has been borked for years. @bamurtaugh:
Without this settings, all files listed on Windows drive mounts are executable for the WSL2 kernel, and Now, the fix is extremely simple. The error occurs because the .sh files that VSCode attempts to execute using @bamurtaugh, I beg you on my knees, pretty please, bump the priority of this issue. It's a two character change, that hasn't been applied in three years and nine months. Can anyone find some free cycles to change one character every 22 months? I had to give up WSL2 development as I have enough Linux boxes at home base, but when I'm on the move, all I have is my notebook. And the WSL2 plugin is updated at least three times a week1, so I have to curse and run the damn Footnotes
|
|
I think you're missing the fact that every time the extension is updated the command has to be run again. |
when i try to connect by wsl-remote i got
sh: 1: /mnt/c/Users/Bastian/.vscode-insiders/extensions/ms-vscode-remote.remote-wsl-0.42.0/scripts/wslServer.sh: Permission denied
The text was updated successfully, but these errors were encountered: