-
Notifications
You must be signed in to change notification settings - Fork 41
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
Unable to paste text or images into a Dev Container #73
Comments
The extension actually runs on the VSCode server, which is the root of the issue. |
May I ask how to solve it? |
This is because xclip does not work properly under the dev container. you can check by run If not work, you should set your DISPLAY environment variable first. For example: Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
export DISPLAY=":99.0" |
Hi. It would be awesome if this issue would be fixed :) I'm using code-server for personal knowledge management (foam, but in web browser) and I think this issue might be similar or the same as in devcontainer. There's some information I found so far: So the solution might be correctly using clipboardy Best regards |
I think I'm running in the same problem, despite not being a "dev container". Using VS Code 1.67.2 on Windows 10, with Remote Server running Ubuntu. When I try to paste I get nothing, on checking the extension's log, I get "Clipboard Type: -1 no xclip" but there isn't "xclip" on Windows. So I thought, ok maybe the extension thinks it's running on Linux because of the remote stuff. Installed xclip on the remote server, but now the error is "Can't open display: (null)" - because, of course, there's no display there since I use it as a remote server only. Which is curious, since it is installed locally and not on the remote server. |
How can I do this in docker-compose? |
Would implementing this into the extension help? |
@chtran46 No. It missing the ability to read non-text clipboard data. I filed the issue about this last year: microsoft/vscode#139761 |
Since the VS Code issue is not expected to be fixed, I created a simple extension for myself. I hope this will be useful to someone. https://marketplace.visualstudio.com/items?itemName=watahani.markdown-image-paste-for-remote |
The dev container believes it's running linux, so it does not work for pasting images in that environment. Even directly in WSL, I get an invalid image being saved.
The text was updated successfully, but these errors were encountered: