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
Clipboard needs an "explicit" text box to start working #3086
Comments
I don't understand this bit. Works for me, even with just
Works-for-me(tm). It was not clear if those apps were supposed to be run from within the xpra session or from the Ubuntu desktop, so I've tried both. Both worked.
It was, now smaller: 82ed138
That was intentional. Now we have both with and without word wrapping: 189ae44 |
Doh! That will be why. A really silly bug too: 26586bf Let's try to get back to the original bug then:
|
I'll try to start with |
"Xpra-Python3-x86_64_4.2-r28905\xpra_cmd" attach ssh://user@ip/2 --ssh="plink -ssh -agent" -d notify,bandwidth -d clipboard --modal-windows=no --title="@title@ on @@/@server-display@" --headerbar=off --opengl=no --bandwidth-limit=6Mbps
XPRA_EXECUTABLE=Xpra-Python3-x86_64_4.2-r28905
2021-04-16 12:28:26,458 Xpra GTK3 client version 4.2 64-bit
2021-04-16 12:28:26,465 running on Microsoft Windows 10
2021-04-16 12:28:31,868 GStreamer version 1.18.4 for Python 3.8.9 64-bit
2021-04-16 12:28:32,688 created named pipe 'Xpra\2104'
2021-04-16 12:28:33,284 keyboard layout code 0x409
2021-04-16 12:28:33,301 identified as 'United States - English' : us
2021-04-16 12:28:33,777 make_clipboardmenuitem()
2021-04-16 12:28:34,452 keyboard settings: layout=us
2021-04-16 12:28:34,477 desktop size is 4160x1440 with 1 screen:
2021-04-16 12:28:34,482 Default (1100x381 mm - DPI: 96x96) workarea: 4160x1400
2021-04-16 12:28:34,483 Generic PnP Monitor 1600x900 at 0x534 (309x174 mm - DPI: 132x131) workarea: 1600x860 at 0x534
2021-04-16 12:28:34,484 C32JG5x 2560x1440 at 1600x0 (697x392 mm - DPI: 93x93) workarea: 2560x1400 at 1600x0
2021-04-16 12:28:38,794 DISCARD_TARGETS=re.compile('^NeXT'), re.compile('^com\\.apple\\.'), re.compile('^CorePasteboardFlavorType'), re.compile('^dyn\\.'), re.compile('^resource-transfer-format'), re.compile('^x-special/')
2021-04-16 12:28:38,800 DISCARD_EXTRA_TARGETS=re.compile('^SAVE_TARGETS$'), re.compile('^COMPOUND_TEXT'), re.compile('GTK_TEXT_BUFFER_CONTENTS')
2021-04-16 12:28:38,801 server clipboard: supported=True, direction=both
2021-04-16 12:28:38,803 client clipboard: supported=True, direction=both
2021-04-16 12:28:38,804 parse_clipboard_caps() clipboard enabled=True
2021-04-16 12:28:38,806 enabled remote logging
2021-04-16 12:28:38,808 Xpra GTK3 X11 server version 4.2-r28886 64-bit
2021-04-16 12:28:38,815 running on Linux Ubuntu 20.04 focal
2021-04-16 12:28:38,817 process_ui_capabilities() clipboard_enabled=True
...
2021-04-16 12:29:52,080 remove_block: CLIPBOARD
2021-04-16 12:32:31,884 process_clipboard_packet: clipboard-token, helper=ClipboardProtocolHelperCore
2021-04-16 12:32:31,888 process clipboard token selection=CLIPBOARD, local clipboard name=CLIPBOARD, proxy=Win32ClipboardProxy
2021-04-16 12:32:31,889 wire selection to raw, encoding=bytes, type=UTF8_STRING, format=8, len(data)=14
2021-04-16 12:32:31,890 got token, selection=CLIPBOARD, targets=(b'UTF8_STRING', b'TEXT', b'STRING', b'text/plain'), target data={'UTF8_STRING': ('UTF8_STRING', 8, b'172.16.253.193')}, claim=True, can-receive=True
2021-04-16 12:32:31,892 _filter_targets(UTF8_STRING, TEXT, STRING, text/plain)=('UTF8_STRING', 'TEXT', 'STRING', 'text/plain')
2021-04-16 12:32:31,893 _filter_targets(UTF8_STRING, TEXT, STRING, text/plain)=('UTF8_STRING', 'TEXT', 'STRING', 'text/plain')
2021-04-16 12:32:31,895 got_contents: tell OS we have UTF8_STRING, TEXT, STRING, text/plain
2021-04-16 12:32:31,896 we got a byte string: b'111.11.111.111'
2021-04-16 12:32:31,901 MultiByteToWideChar wlen=14
2021-04-16 12:32:31,902 GlobalAlloc buf=0x18ae0088
2021-04-16 12:32:31,904 with_clipboard_lock(1313290, <function Win32ClipboardProxy.set_clipboard_text.<locals>.set_clipboard_data at 0x0000000007161a60>, <function Win32ClipboardProxy.set_clipboard_text.<locals>.set_clipboard_error at 0x00000000071615e0>, 5, 10)
2021-04-16 12:32:31,905 OpenClipboard(0x140a0a)=1
2021-04-16 12:32:31,919 clipboard event: DESTROYCLIPBOARD, current owner: our window (hwnd=0x140a0a)
2021-04-16 12:32:31,921 EmptyClipboard()=1
2021-04-16 12:32:31,935 SetClipboardData(CF_UNICODETEXT, 14 chars)=414056584
2021-04-16 12:32:31,936 <function Win32ClipboardProxy.set_clipboard_text.<locals>.set_clipboard_data at 0x0000000007161a60>()=True
2021-04-16 12:32:31,938 CloseClipboard()=1
2021-04-16 12:32:31,940 clipboard event: CLIPBOARDUPDATE, current owner: our window (hwnd=0x140a0a)
2021-04-16 12:32:31,943 remove_block: CLIPBOARD
2021-04-16 12:36:55,630 clipboard event: DESTROYCLIPBOARD, current owner: our window (hwnd=0x140a0a)
2021-04-16 12:36:55,649 clipboard event: CLIPBOARDUPDATE, current owner: 'vivaldi.exe' with pid 5476 (hwnd=0x30504)
2021-04-16 12:36:55,655 _send_clipboard_token_handler(Win32ClipboardProxy, ())
2021-04-16 12:36:55,658 send_clipboard_token_handler CLIPBOARD to CLIPBOARD
2021-04-16 12:36:55,659 clipboard_send: clipboard-token
2021-04-16 12:36:55,661 remove_block: CLIPBOARD
2021-04-16 12:36:55,703 process_clipboard_packet: clipboard-request, helper=ClipboardProtocolHelperCore
2021-04-16 12:36:55,708 process clipboard request, request_id=21, selection=CLIPBOARD, local name=CLIPBOARD, target=TARGETS
2021-04-16 12:36:55,710 get_contents('TARGETS', <function ClipboardProtocolHelperCore._process_clipboard_request.<locals>.got_contents at 0x0000000007161160>)
2021-04-16 12:36:55,711 with_clipboard_lock(1313290, <function Win32ClipboardProxy.get_contents.<locals>.got_clipboard_lock at 0x0000000007161820>, <function Win32ClipboardProxy.get_contents.<locals>.lockerror at 0x00000000071614c0>, 5, 10)
2021-04-16 12:36:55,715 OpenClipboard(0x140a0a)=[WinError 0] The operation completed successfully., current owner: 'vivaldi.exe' with pid 5476 (hwnd=0x30504)
2021-04-16 12:36:55,721 process_clipboard_packet: clipboard-pending-requests, helper=ClipboardProtocolHelperCore
2021-04-16 12:36:55,723 clipboard_progress(None, 1)
2021-04-16 12:36:55,724 clipboard_notify(1) notification timer=None
2021-04-16 12:36:55,738 with_clipboard_lock(1313290, <function Win32ClipboardProxy.get_contents.<locals>.got_clipboard_lock at 0x0000000007161820>, <function Win32ClipboardProxy.get_contents.<locals>.lockerror at 0x00000000071614c0>, 4, 15)
2021-04-16 12:36:55,742 OpenClipboard(0x140a0a)=[WinError 0] The operation completed successfully., current owner: 'vivaldi.exe' with pid 5476 (hwnd=0x30504)
2021-04-16 12:36:55,762 with_clipboard_lock(1313290, <function Win32ClipboardProxy.get_contents.<locals>.got_clipboard_lock at 0x0000000007161820>, <function Win32ClipboardProxy.get_contents.<locals>.lockerror at 0x00000000071614c0>, 3, 20)
2021-04-16 12:36:55,770 OpenClipboard(0x140a0a)=[WinError 0] The operation completed successfully., current owner: 'vivaldi.exe' with pid 5476 (hwnd=0x30504)
2021-04-16 12:36:55,794 with_clipboard_lock(1313290, <function Win32ClipboardProxy.get_contents.<locals>.got_clipboard_lock at 0x0000000007161820>, <function Win32ClipboardProxy.get_contents.<locals>.lockerror at 0x00000000071614c0>, 2, 25)
2021-04-16 12:36:55,800 OpenClipboard(0x140a0a)=[WinError 0] The operation completed successfully., current owner: 'vivaldi.exe' with pid 5476 (hwnd=0x30504)
2021-04-16 12:36:55,830 with_clipboard_lock(1313290, <function Win32ClipboardProxy.get_contents.<locals>.got_clipboard_lock at 0x0000000007161820>, <function Win32ClipboardProxy.get_contents.<locals>.lockerror at 0x00000000071614c0>, 1, 30)
2021-04-16 12:36:55,836 OpenClipboard(0x140a0a)=1
2021-04-16 12:36:55,838 get_clipboard formats()=HTML Format, CF_UNICODETEXT, 16, CF_TEXT, CF_OEMTEXT
2021-04-16 12:36:55,840 targets(HTML Format, CF_UNICODETEXT, 16, CF_TEXT, CF_OEMTEXT)=text/plain;charset=utf-8, UTF8_STRING, CF_UNICODETEXT, TEXT, STRING, text/plain
2021-04-16 12:36:55,842 proxy_got_contents(21, CLIPBOARD, TARGETS, ATOM, 32, <class 'list'>:6) data=0x5b27746578742f706c61696e3b636861727365743d7574662d38272c2027555446385f535452494e47272c202743465f554e49434f444554455854272c202754455854272c2027535452494e47272c2027746578742f706c61696e275d..
2021-04-16 12:36:55,848 _filter_targets(text/plain;charset=utf-8, UTF8_STRING, CF_UNICODETEXT, TEXT, STRING, text/plain)=('text/plain;charset=utf-8', 'UTF8_STRING', 'CF_UNICODETEXT', 'TEXT', 'STRING', 'text/plain')
2021-04-16 12:36:55,850 clipboard raw -> wire: ('ATOM', 32, ['text/plain;charset=utf-8', 'UTF8_STRING', 'CF_UNICODETEXT', 'TEXT', 'STRING', 'text/plain']) -> ('atoms', ('text/plain;charset=utf-8', 'UTF8_STR .. F_UNICODETEXT', 'TEXT', 'STRING', 'text/plain'))
2021-04-16 12:36:55,853 clipboard_send: clipboard-contents
2021-04-16 12:36:55,854 <function Win32ClipboardProxy.get_contents.<locals>.got_clipboard_lock at 0x0000000007161820>()=True
2021-04-16 12:36:55,856 CloseClipboard()=1
2021-04-16 12:36:56,042 process_clipboard_packet: clipboard-pending-requests, helper=ClipboardProtocolHelperCore
2021-04-16 12:36:56,046 clipboard_progress(None, 0)
2021-04-16 12:36:56,048 clipboard_notify(0) notification timer=None
2021-04-16 12:37:01,954 process_clipboard_packet: clipboard-request, helper=ClipboardProtocolHelperCore
2021-04-16 12:37:01,958 process clipboard request, request_id=22, selection=CLIPBOARD, local name=CLIPBOARD, target=text/plain;charset=utf-8
2021-04-16 12:37:01,960 get_contents('text/plain;charset=utf-8', <function ClipboardProtocolHelperCore._process_clipboard_request.<locals>.got_contents at 0x0000000007161700>)
2021-04-16 12:37:01,964 with_clipboard_lock(1313290, <function Win32ClipboardProxy.get_clipboard_text.<locals>.get_text at 0x000000000715e1f0>, <function Win32ClipboardProxy.get_contents.<locals>.errback at 0x0000000007161dc0>, 5, 10)
2021-04-16 12:37:01,965 OpenClipboard(0x140a0a)=1
2021-04-16 12:37:01,966 get_clipboard formats()=HTML Format, CF_UNICODETEXT, 16, CF_TEXT, CF_OEMTEXT
2021-04-16 12:37:01,971 supported formats: CF_UNICODETEXT, CF_TEXT, CF_OEMTEXT (prefer utf8: True)
2021-04-16 12:37:02,017 GetClipboardData(CF_UNICODETEXT)=0x187a2b10
2021-04-16 12:37:02,020 got data handle lock 0x187a2b10 for format 'CF_UNICODETEXT'
2021-04-16 12:37:02,022 got 26 bytes of UNICODE data: b'iiiiiiiiiiiiiiiiiiiiiiiiiiiii'
2021-04-16 12:37:02,023 got_text(b'iiiiiiiiiiiiiiiiiiiiiiiiiiiii')
2021-04-16 12:37:02,024 proxy_got_contents(22, CLIPBOARD, text/plain;charset=utf-8, text/plain;charset=utf-8, 8, <class 'bytes'>:26) data=0x6969696969696969696969696969696969696969696969696969..
2021-04-16 12:37:02,025 _munge_raw_selection_to_wire('text/plain;charset=utf-8', 'text/plain;charset=utf-8', 8, 'iiiiiiiiiiiiiiiiiiiiiiiiiiiii')
2021-04-16 12:37:02,027 _do_munge_raw_selection_to_wire(text/plain;charset=utf-8, text/plain;charset=utf-8, 8, <class 'bytes'>:26)
2021-04-16 12:37:02,028 clipboard raw -> wire: ('text/plain;charset=utf-8', 8, b'iiiiiiiiiiiiiiiiiiiiiiiiiiiii') -> (b'bytes', b'iiiiiiiiiiiiiiiiiiiiiiiiiiiii')
2021-04-16 12:37:02,033 clipboard_send: clipboard-contents
2021-04-16 12:37:02,035 <function Win32ClipboardProxy.get_clipboard_text.<locals>.get_text at 0x000000000715e1f0>()=True
2021-04-16 12:37:02,037 CloseClipboard()=1
2021-04-16 12:37:02,038 process_clipboard_packet: clipboard-pending-requests, helper=ClipboardProtocolHelperCore
2021-04-16 12:37:02,040 clipboard_progress(None, 1)
2021-04-16 12:37:02,045 clipboard_notify(1) notification timer=None
2021-04-16 12:37:02,178 process_clipboard_packet: clipboard-pending-requests, helper=ClipboardProtocolHelperCore
2021-04-16 12:37:02,182 clipboard_progress(None, 0)
2021-04-16 12:37:02,183 clipboard_notify(0) notification timer=None Notice the 5-second delay |
There's nothing unusual in that log:
My guess is that the application which is requesting the clipboard data is being facetious and maybe requesting an invalid target Only the server's |
I knew it was gonna come to that 😛 |
Sadly, I couldn't do it today 😕 |
I think I must have replicated it and I am pretty sure you'll see it here: |
I only found the bug right at the end. So I'll keep the log summary I had already written for reference. From the first log, the clipboard bits start near
Which seems perfectly normal, we even reply to two applications ( Shortly after that:
Terminal asked for From the second log, near
So the minor problem here is that the server is sending clipboard packets for
Again, everything is as it should be. Finally. The bug. Near
Then a few seconds later (too late):
But the next request (295) does make it through in time:
So, what's happening here is that it takes too long for the clipboard request (it takes over 1.5 seconds) and we hit the timeout. Ideally, we should figure out why your connection has such high latency at times. As it makes everything difficult. |
I would like to have a simple, external server/client model continuously monitoring those data, but I don't know what it should be (or how should I write such code!).
My "problem" with this is that I believe I can replicate it accurately at almost all times (>= 80%~90%), lacking any specific formalism proving otherwise. However, your log data point always to latency; which is not unreasonable, but "fail to satisfy" my observations (at least in full) given that I feel that there are workarounds. My setup is the "well known" one: ADSL line encapsulated in an IPSec VPN. |
Is this server-side, or client-side? If it's server-side, because of #3088 I cannot apply it via environment variables. |
Also
pls 😛 |
Applying the above suggestion on the client, and starting with the remote end first, clipboard works as expected. |
Both. Clipboard synchronizes both ways. As per the commit just above increasing the default timeout value, it should be much more difficult to trigger now. Can you just explain what you meant by "needs an explicit text box to start working"?
No. That would be too messy.
That could be done, but the code would be a little bit harder to read. $ grep -r envint ./xpra/ | egrep -v ".c:|.html:" | wc -l
334
$ grep -r envbool ./xpra/ | egrep -v ".c:|.html:" | wc -l
516
$ grep -r os.environ.get ./xpra/ | egrep -v ".c:|.html:" | wc -l
314 |
Okay, I guess, if it is bothering so much 😂
gnome-terminal: Does not work.
|
What doesn't work? Cutting? pasting? Works-for-me(tm) in both directions with Reminder: you have to tell |
First time pasting, sending from client to server. So YEEEEEEH FIXED 😀
Yeah, I know that, I am talking specifically about Ctrl+Shift+V. |
Unless I've pasted in an explicit textbox, e.g.
The clipboard would refuse to paste e.g. in gnome-terminal or in LibreOffice Calc (Excel)
PS:
(PPS: This may be the 4.1.2 version)
PPPS: Look ma! I move the window from far far away! :-D
The text was updated successfully, but these errors were encountered: