Does Not Work With Remote-WSL Extension
See original GitHub issueHello! This extension doesn’t work out of the box with the Windows Subsystem for Linux extension suite. I am using VScode 1.48, windows 10, WSL & the Remote - WSL extension.
I believe the issue is that this extension, by default, tries to force you to run it on the wsl-remote side which does not have access to the windows clipboard.
I was able to fix the issue by adding this to settings.json:
"remote.extensionKind": {
"telesoho.vscode-markdown-paste-image": ["ui"],
}
This forces the extension to run on the UI/Windows side where it has access to the windows clipboard.
This could be fixed by setting vscode-markdown-paste-image to run on the ui/windows side by default when remote extensions are installed.
In the meantime, the above local fix works for wsl if anyone else is having the same issue.
[EDIT: after experimenting with it a bit more, it doesn’t actually work, even with this fix. Changing the settings.json so it runs on the ui side lets you access the clipboard. But it does not actually save the image file that you create.]
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:7 (2 by maintainers)
When Running wsl-remote. I create an image in the windows clipboard using the screen snipping tool.
When I try to paste that image into a markdown file via
Ctrl+Alt+V
, the UI takes me through the options for saving/pasting an image. It allows me to name the filepath & then creates an image style link. When I navigate to where the image is supposed to be, vscode says “an error occured while loading this image.” & navigating to the directory through any other file explorer shows that no image file was actually created.I’ve attached a screenshot of the console output as you requested as well as vscode trying to view the image.
I think that you are correct that the extension doesn’t correctly get the image clipboard contents in WSL. The extension works correctly when I use it without WSL
Well, to me, I think the problem of SSH and WSL are different. For WSL, you still have access to Windows through
bash
, because you can evokepowershell.exe
orcmd.exe
(etc.) to access Windows, which is your editing environment. However, in the case of SSH, the extensions can only access thetarget
environment, but not thehost
environment (editing environment).And to implement the functionalities for WSL, we have to separate it into two steps:
isWsl
shell
I have added the similar support in another project: https://github.com/PicGo/PicGo-Core/pull/87