clopboard copy returns python "byte" string
GbGp opened this issue · comments
Describe the bug
When I copy (CTRL+C) some string from a client i get a python string "b'copied text'" rather than just "copied text".
To Reproduce
Steps to reproduce the behavior:
- connect to any server
- try to copy some text to the clipboard
System Information (please complete the following information):
- Server OS: Ubuntu
- Client OS: Ubuntu
- Xpra Server Version v6.0
- Xpra Client Version v6.0
Additional context
I only gave a quick look but I image the problem is probably here:
https://github.com/Xpra-org/xpra/blob/master/xpra/gtk/clipboard.py#L81
Should be something like str(data.decode())
LOG:
2024-05-16 14:41:27,094 got token, selection=CLIPBOARD, targets=('UTF8_STRING', 'TEXT', 'STRING', 'text/plain'), target data={'UTF8_STRING': ('UTF8_STRING', 8, b'MY TEXT')}, claim=True, synchronous_client=False, can-receive=True
2024-05-16 14:41:27,094 setting text data UTF8_STRING / 8 of size 10: b'MY TEXT'
What Ubuntu version is this?
Is this a Wayland client session?
If so, b82d4dd should fix this.
AFAICT, this does not affect X11, MacOS or MS Windows which all have native backends.
Wayland does not and is limited to calling Gtk.Clipboard.set_text
Ubuntu 22.04.4 LTS, yes the client is Wayland
This will be included in v6.0.1