Summary: | Clipboard gets two entries (one truncated) when KRDC client is connected to a VNC server (Krfb) | ||
---|---|---|---|
Product: | [Applications] krdc | Reporter: | David Warner <david.p.warner> |
Component: | VNC | Assignee: | Urs Wolfer <uwolfer> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | ctrlaltca, gwdx, maiphi.public |
Priority: | NOR | ||
Version First Reported In: | 20.08 | ||
Target Milestone: | --- | ||
Platform: | Fedora RPMs | ||
OS: | Linux | ||
Latest Commit: | 9775af314f8685cba9c9009af88c107a6d8c401d | Version Fixed In: | |
Sentry Crash Report: | |||
Attachments: | Clipboard manager screenshot |
Description
David Warner
2020-12-13 14:03:09 UTC
I can confirm this (on Tumbleweed and neon-user-20210506-0945 using X) and I'm in particular affected by the copy&paste problem. Copying a file in Dolphin and pasting it opens the "filename for clipboard content" dialogue (client to client copy not involving the server). Entering a file name creates a text file with the URL of the copied file instead of the file itself. Yes, there are two entries in Klipper: the file and its URL. But choosing the file explicitly doesn't work either, the URL always stays in the first place. Not only KDE applications are affected, but also e.g. LibreOffice (formulas can't be pasted anymore). And umlauts are pasted with the wrong encoding. I'm connecting to a Raspberry Pi 4 running Ubuntu 21.04 and Kfrb via VNC. Client keyboard layout is en_US, server de_DE. Other than in https://bugs.kde.org/show_bug.cgi?id=327311 and https://bugs.kde.org/show_bug.cgi?id=420177, the keyboard layout on the client is not changed when the connection is established. As soon as KRDC is disconnected, everything is back to normal. The behaviour has changed for me recently, possibly in KDE Plasma 5.21 - I still get 2 clipboard entries, but instead of 1 being truncated like before, the >1 byte characters are replaced with '?' (e.g. '五十音, "Fifty Sounds"' -> '???, "Fifty Sounds"'). As Philipp Maierhöfer notes, closing KRDC will stop this happening. Alternatively, clearing the clipboard history while KRDC is running will break copy/paste in and out of KRDC but avoid the double entry problem elsewhere. Relevant merge requests: https://invent.kde.org/network/krfb/-/merge_requests/88 https://invent.kde.org/network/krdc/-/merge_requests/182 VNC: Add UTF-8 clipboard support Changes: - Use SendClientCutTextUTF8() to send clipboard text in UTF-8, falling back to Latin1 if UTF-8 is not supported. - Implement GotXCutTextUTF8() to handle received UTF-8 clipboard content. - Extend cuttext() to handle UTF-8 encoded content. +30 -5 vnc/vncclientthread.cpp +2 -1 vnc/vncclientthread.h https://invent.kde.org/network/krdc/-/commit/9775af314f8685cba9c9009af88c107a6d8c401d Git commit c434224d23d1ff8f45c692b329c7101a8c2c04ee by Alexey Min, on behalf of Wendi Gan. Committed on 03/05/2025 at 10:13. Pushed by alexeymin into branch 'master'. Add UTF-8 clipboard support Changes: - Use rfbSendServerCutTextUTF8() to send clipboard text in UTF-8, falling back to Latin1 if UTF-8 is not supported. - Implement setXCutTextUTF8() to handle received UTF-8 clipboard content. M +15 -4 krfb/rfbserver.cpp M +1 -0 krfb/rfbserver.h https://invent.kde.org/network/krfb/-/commit/c434224d23d1ff8f45c692b329c7101a8c2c04ee |