Running thunderbird on server, copying or pasting text from/into thunderbird's editor area not working most of the time.
In the test I've copied text from leafpad on the client to leafpad on server (successful), then another text from leafpad on the client to thunderbird on server (previous data is pasted). Then again (unsuccessful), then pasted to leafpad on server (successful), then pasted to thunderbird (after pasted to leafpad, successful).
So after using clipboard for the first time, I'm only being able to paste to thunderbird after I paste to something else.
From the log samples: xpra X11 version 2.0-r15223 64-bit on Linux Debian 9.0 stretch.
Oh god, another clipboard bug..
I cannot reproduce. The clipboard works for me everytime, in both directions. I've tried on Fedora 25 and Debian Stretch.
Maybe something is interfering with the clipboard on your client system? See wiki/Clipboard.
I cannot use the sample log files provided as I have no way of knowing which part of the log file relate to what: the communication is done via the X11 server's "selections", so all the events look pretty much the same.
Please provide more succinct or annotated log samples, otherwise I will have to close this ticket as "worksforme".
I've isolated two events: I copy text from leafpad on client and unsuccessfully try to paste it into thunderbird on server. No clipboard manager running. Copied text was:
2:36: copy from leafpad client to tb server
Attaching this part of server log and client output...
OK, so that's quite a bit clearer. We see lots of:
process clipboard request, request_id=11, selection=CLIPBOARD, local name=CLIPBOARD, target=TARGETS
That's the application requesting the list of targets for the clipboard. (the list of formats we can supply for this clipboard)
We dutifully respond every time with the list:
['TIMESTAMP', 'TARGETS', 'MULTIPLE', 'GTK_TEXT_BUFFER_CONTENTS', \ 'application/x-gtk-text-buffer-rich-text', 'UTF8_STRING', 'TEXT', 'STRING', \ 'text/plain;charset=utf-8', 'text/plain']
But then we get a request that doesn't make any sense:
process clipboard request, request_id=14, selection=CLIPBOARD, local name=CLIPBOARD, target=application/x-moz-nativehtml
As it uses a target ("application/x-moz-nativehtml") we have not advertised. And when forward it to the application, it responds with "no data":
unpack(..) type=, format=0, data=<type 'NoneType'>:0
Which is expected since we're requesting a target it knows nothing about.
And this rings a bell:
The patch above was not applicable as it is: some applications may provide the "x-moz-nativehtml" target, so we should only translate this target if it isn't going to work. r15589 does that, it also exposes the targets we have last sent via xpra info:
$ xpra info | grep last-targets
@psycho_zs: does that work for you now?
Not heard back, closing.
Formatting is lost on paste, e.g. when copying from LibreOffice? on client to Thunderbird on server.
Also I can not paste anything formatted copied from Firefox. And clipboard stops working after such attempt. E.g. when copying a random couple dozen lines from this ticket page.
BTW, this can be related: #1458
firefox@client to thunderbird@server
Formatting is lost on paste, e.g. when copying from LibreOffice?? on client to Thunderbird on server. Also I can not paste anything formatted copied from Firefox.
That's a different issue, please file another ticket and link back here.
It could well be because we are now filtering the invalid target
And clipboard stops working after such attempt. E.g. when copying a random couple dozen lines from this ticket page.
Works for me, though after repeated copying I saw one of those two warnings in the server log and the clipboard was then disabled (as per the message):
clipboard disabled: more than %s clipboard requests per second!
Warning: loop nesting too deep: 10 you may have a clipboard forwarding loop, disabling the clipboard
That's because thunderbird and Firefox make dozens of clipboard requests for a single paste... so r16146 tolerates more clipboard requests per second before giving up: waiting for sustained requests and tolerating more bursts, r16147 also raises the loop nesting limit to 20.
This should help a bit, but don't expect miracles: what those apps are doing with the clipboard is really pushing it.
this ticket has been moved to: https://github.com/Xpra-org/xpra/issues/1458