Closed stdedos closed 5 months ago
I tried to replicate it to xterm ... but idk how to paste on it 😓
This is documented! https://github.com/Xpra-org/xpra/blob/master/docs/Features/Clipboard.md#tool
Running the client with -d clipboard
and copying from pycharm
running on Fedora to notepad++
running on Windows 10, I see:
2024-05-23 13:12:33,840 process_clipboard_packet: clipboard-token, helper=ClipboardProtocolHelperCore
2024-05-23 13:12:33,842 process clipboard token selection=CLIPBOARD, local clipboard name=CLIPBOARD, proxy=Win32ClipboardProxy
2024-05-23 13:12:33,844 _filter_targets(UTF8_STRING, TEXT, STRING, text/plain)=('UTF8_STRING', 'TEXT', 'STRING', 'text/plain')
2024-05-23 13:12:33,845 wire selection to raw, encoding=bytes, type=UTF8_STRING, format=8, len(data)=189
2024-05-23 13:12:33,846 got token, selection=CLIPBOARD, targets=('UTF8_STRING', 'TEXT', 'STRING', 'text/plain'), target data={'UTF8_STRING': ('UTF8_STRING', 8, b' def aud .. rce:\n self.stop_sending_audio()\n')}, claim=True, can-receive=True
2024-05-23 13:12:33,847 _filter_targets(UTF8_STRING, TEXT, STRING, text/plain)=('UTF8_STRING', 'TEXT', 'STRING', 'text/plain')
2024-05-23 13:12:33,849 _filter_targets(UTF8_STRING, TEXT, STRING, text/plain)=('UTF8_STRING', 'TEXT', 'STRING', 'text/plain')
2024-05-23 13:12:33,849 got_contents: tell OS we have UTF8_STRING, TEXT, STRING, text/plain
2024-05-23 13:12:33,851 we got a byte string: b' def audio_source_exit(self, source, *args) .. ource:\n self.stop_sending_audio()\n'
2024-05-23 13:12:33,852 MultiByteToWideChar wlen=193
2024-05-23 13:12:33,853 GlobalAlloc buf=0x2c5f2020078
2024-05-23 13:12:33,853 with_clipboard_lock(460026, <function Win32ClipboardProxy.set_clipboard_text<locals>.set_clipboard_data at 0x000002c5f321c180>, <function Win32ClipboardProxy.set_clipboard_text.<locals>.set_clipboard_error at 0x000002c5f321c360>, 5, 10)
2024-05-23 13:12:33,853 OpenClipboard(0x704fa)=1
2024-05-23 13:12:33,855 EmptyClipboard()=1
2024-05-23 13:12:33,855 SetClipboardData(CF_UNICODETEXT, 193 chars)=3049192030328
2024-05-23 13:12:33,856 <function Win32ClipboardProxy.set_clipboard_text.<locals>.set_clipboard_data at 0x000002c5f321c180>()=True
2024-05-23 13:12:33,857 CloseClipboard()=1
2024-05-23 13:12:33,858 clipboard event: CLIPBOARDUPDATE, current owner: our window (hwnd=0x704fa)
2024-05-23 13:12:33,859 remove_block: CLIPBOARD
And I get the method pasted into notepad++
exactly as expected, that's both before and after the UTF8 fix for #4233.
@stdedos what am I doing wrong?
Right ... I seem not to be able to trigger it anymore 😕
"Xpra-Light-x86_64_6.1-r35826\xpra_cmd" shadow ssh://user@ip/0 --modal-windows=no --headerbar=off --title="@title@ on @@/@server-display@" --encodings=-webp --microphone=off --speaker=off --webcam=no --pulseaudio=no --opengl=no --min-speed=70 --key-shortcut=Shift+F2:toggle_pointer_grab
XPRA_EXECUTABLE=Xpra-Light-x86_64_6.1-r35826
XPRA_FILE_CHOOSER_NATIVE=2
2024-05-25 23:00:05,053 Xpra GTK3 client version 6.1-r35826 (g4b8baa544b) beta (light build)
2024-05-25 23:00:05,945 running on Microsoft Windows Microsoft Windows 10 Enterprise
2024-05-25 23:00:05,945 cpython 3.11
2024-05-25 23:00:16,351 GStreamer version 1.24.3
2024-05-25 23:00:16,369 created named pipe 'Xpra\49656'
2024-05-25 23:00:50,810 keyboard layout 'United States - English' : 'us' (0x409)
2024-05-25 23:00:50,960 Connected (version 2.0, client OpenSSH_8.2p1)
2024-05-25 23:00:51,300 SSH password authentication failed:
2024-05-25 23:00:51,300 Bad authentication type
2024-05-25 23:00:51,300 allowed types: ['publickey', 'password']
2024-05-25 23:00:56,516 Authentication (password) successful!
2024-05-25 23:00:57,111 ssh server OS is 'linux-gnu'
2024-05-25 23:00:57,237 paramiko SSH agent forwarding enabled
2024-05-25 23:00:57,250 keyboard settings: layout=us
2024-05-25 23:00:57,252 desktop size is 4480x1516:
2024-05-25 23:00:57,252 Default (1185x401 mm - DPI: 96x96) workarea: 4480x1476
2024-05-25 23:00:57,253 Samsung C32JG5x 2560x1440 at 0x0 (697x392 mm - DPI: 93x93) workarea: 2560x1400
2024-05-25 23:00:57,253 LG IPS234 1920x1080 at 2560x436 (510x290 mm - DPI: 96x95) workarea: 1920x1040 at 2560x436
2024-05-25 23:00:57,672 SSH: 'Entering daemon mode; any further errors will be reported to:'
2024-05-25 23:00:57,673 SSH: " '/run/user/1000/xpra/0/server.log'"
2024-05-25 23:00:59,663 enabled remote logging
2024-05-25 23:00:59,664 Xpra shadow server version 5.0
2024-05-25 23:00:59,664 remote desktop size is 1920x1080
2024-05-25 23:00:59,665 :0.0 (508x285 mm - DPI: 96x96) workarea: 1848x1053 at 72x27
2024-05-25 23:00:59,666 LGD eDP-1 (309x174 mm - DPI: 158x158)
2024-05-25 23:01:01,181 running, 1 windows
Describe the bug
A clear and concise description of what the bug is.
Actual paste contents
I can very reliably replicate it by copying from Ubuntu Sublime Merge to Windows Sublime Text. I don't know if the applications involved affect this*. Also, there don't seem to be errors in the log
To Reproduce Steps to reproduce the behavior:
System Information (please complete the following information):
Additional context Add any other context about the problem here. Please see "reporting bugs" in the wiki section.
*: On a "newer" server (still Ubuntu 20.04.6), when copying from PyCharm Professional v242 (I think) e.g. this
to Windows, I get the "HTML Rich Text format" as a result (instead of the raw text above)
Does not seem to happen on the "older" server, with PC-232.10227.11 PyCharm Community installed, though.
I tried to replicate it to
xterm
... but idk how to paste on it 😓 It seems to be a bug when copy-pasting from e.g. gnome-text-editor