I need feedback on clipboard behaviour on Qubes r4.2.3
I appreciate if anyone could try copying a text file over 256KiB to clipboard (in any qube) and then try to copy it to Global clipboard. You could create a text file large enough with something like this:
#!/bin/python
a = "x"*255 + "\n"
b = a*2048
print(b)
The output of the above python code will be 512KiB. Which you could pipe to a text file. And then try to open the text file in a text editor, copy it to clipboard (ctrl+c). Then copy to global clipboard (ctrl+shitf+c). I would like to know the output message from Global Clipboard widget.
For what it’s worth, I get a max. global clipboard size of 65000 bytes for clipboard sizes <= 256KiB
If the source is greater than 256KiB, apparently only one byte gets in. I write “apparently” because pasting that 1-byte global clipboard into a file results (consistently) in:
Note that I used vi and didn’t press anything but “Esc :wq” after pasting the global clipboard.
Buffer under-/over- flow? “c2 b1 0a” magic incantation?
Yes. This is what I have been working on in last few days. Here is my analysis and further done the video & description of the solution:
And above 256KiB, X11 mechanism switches to a protocol known as INCR, communicating clipboard data in chunks of 256KiBs; Which originally Qubes OS devs did not consider during the early development of shared inter-vm clipboard. It turns out that it is also a known bug. But no one had the time to work on it: