Closed joaociocca closed 1 year ago
Capture a image,and then execute this script https://github.com/imlinhanchao/vsc-markdown-image/blob/master/asserts/linux.sh like:
./linux.sh output.png
Give me the output of command line,thks.
whoa, that was lightning fast. Hang on, gotta restore the VM.
Ok, grabbed the script, print in clipboard...
And, as expected, Error: Can't open display: (null)
I noticed you are using in a remote VM. Unfortunately, xclip requires an X desktop, so it won't work in a remote VM.
I followed some instructions from https://stackoverflow.com/questions/65468655/vs-code-remote-x11-cant-get-display-while-connecting-to-remote-server and got remote tmux to succesfully transfer content to my local clipboard
But when executing the linux.sh
script you pointed to, all I get is a new error:
then I tried again and...
But it was only the text I had previously copied...
let's try again with the above image in the clipboard...
Yeah, no deal.
It's grabbing an even older content I copied from tmux (you can see it on the first print here)
(edit) I can definitely copy from remote and paste on local...
I forgot to mention that my tmux uses xclip - so here, plain and open piping text to xclip:
HA! Found out that the functionality is on experimental and already working actually! <3 https://github.com/microsoft/vscode/issues/164843#issuecomment-1294460344
But thanks for developing this and for attempting to help me =) Keep being awesome!
The idea of your extension seemed perfect for the only functionality I feel is lacking on VS Code!
But when I try to paste a capture image (either with Alt+Shift+V or right-click > Paste Image), nothing happened.
I thought I'd then look on the VSCode Dev Tools and there it was:
[Extension Host] Get 0 images workbench.desktop.main.js:87
When inspecting line 87, it shows the ondulated underline of an error:
Prettifying the code, the error seems to be on line 29860 of the workbench.desktop.main.js:
I'm not much of a programmer, but it seems the extension is using a
Buffer()
deprecated function? I tried to find thisBuffer()
, seems like there's only 2 occurences: line 51931 and line 246735I'm running
VS Code 1.73.1
onWindows 11 Pro 22H2 22621.819
, but remoting into a Kali (based off Ubuntu,Linux kali 5.19.0-kali2-amd64 #1 SMP PREEMPT_DYNAMIC Debian 5.19.11-1kali2 (2022-10-10) x86_64 GNU/Linux
) session (which hasxclip 0.13
installed).Could this be related to the error I get when trying to run xclip in this session? I always get a
Error: Can't open display: (null)
message.Any ideas on how to make it work?