Bug 443271 - Kdeconnect hijacks the clipboard when connected to another Plasma desktop
Summary: Kdeconnect hijacks the clipboard when connected to another Plasma desktop
Status: RESOLVED FIXED
Alias: None
Product: kdeconnect
Classification: Applications
Component: common (show other bugs)
Version: unspecified
Platform: Other Linux
: HI normal
Target Milestone: ---
Assignee: Albert Vaca Cintora
URL:
Keywords:
: 445167 450387 (view as bug list)
Depends on:
Blocks:
 
Reported: 2021-10-04 00:36 UTC by Fushan Wen
Modified: 2022-06-02 08:22 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In: 22.04
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Fushan Wen 2021-10-04 00:36:35 UTC
SUMMARY
If I set up a connection with another Plasma desktop, any content I copy from one Plasma desktop will not be pasted with Ctrl+V directly, but clipboard history has the item. The bug is gone when the clipboard plugin is disabled.

STEPS TO REPRODUCE
1. Pair with another Plasma desktop
2. Enable "Clipboard" plugin
3. Copy some text and paste with "Ctrl+V"

OBSERVED RESULT
No text is pasted, but clipboard history has the item.

EXPECTED RESULT
Paste normally.

SOFTWARE/OS VERSIONS
Operating System: openSUSE Tumbleweed 20210929
KDE Plasma Version: 5.23.80
KDE Frameworks Version: 5.87.0
Qt Version: 5.15.2
Kernel Version: 5.14.6-1-default (64-bit)
Graphics Platform: X11
Processors: 8 × AMD Ryzen 7 4700U with Radeon Graphics
Memory: 15.0 GiB of RAM
Graphics Processor: AMD RENOIR

ADDITIONAL INFORMATION
Information for package kdeconnect-kde:
---------------------------------------
Repository     : unstable-kde-applications
Name           : kdeconnect-kde
Version        : 21.11.70git.20210926T172742~ee85a5d5-ku.20.2
Arch           : x86_64
Vendor         : obs://build.opensuse.org/KDE:Unstable
Installed Size : 3.7 MiB
Installed      : Yes
Status         : up-to-date
Source package : kdeconnect-kde-21.11.70git.20210926T172742~ee85a5d5-ku.20.2.src
Summary        : Integration of Android with Linux desktops
Description    : 
    A package for integration of Android with Linux desktops.

    Current feature list:
    - Clipboard share: copy from or to your desktop
    - Notifications sync (4.3+): Read your Android notifications
    - Multimedia remote control: Use your phone as a remote control
    - WiFi connection: no USB wire or Bluetooth needed
    - RSA Encryption: your information is safe

    Please note you will need to install KDE Connect on Android for this app to work:
    https://play.google.com/store/apps/details?id=org.kde.kdeconnect_tp or
    https://f-droid.org/en/packages/org.kde.kdeconnect_tp/
Comment 1 Roman Gilg 2021-11-08 23:41:18 UTC
*** Bug 445167 has been marked as a duplicate of this bug. ***
Comment 2 Nate Graham 2021-11-08 23:41:58 UTC
Oh wow I never would have thought to hook it up to another computer.
Comment 3 Roman Gilg 2021-11-08 23:57:59 UTC
* For me it puts the clipboard content as second item into the clipboard history, so it still only copies the entry which was before and now is still at the top. I believe though that's through resetting the clipboard back to the previous value.
* It also happens to me only on every second paste attempt. 
* It happens on Wayland and X11.

I checked out git commits of KDE Connect up until 12ad4e3e in June and could reproduce the issue also here. Don't know the first bad commit but I never had this issue before so I would assume that this bug was introduced through some other update.

@qydwhotmail, when did you first encounter it on your system?
Comment 4 Fushan Wen 2021-11-09 00:42:57 UTC
Since Plasma 5.22, I estimate. But that's because I started using kdeconnect only after 5.22.
Comment 5 Riccardo Robecchi 2022-01-12 11:12:12 UTC
It's been like this for at least one year and a half. I can confirm I am affected as well; what I see is that a blank clipboard element is put at the top of the stack in the clipboard, de facto making it impossible to use clipboard sharing. I do not always see this though, I have yet to understand under which conditions the bug appears.
Comment 6 Till Schäfer 2022-02-16 15:33:49 UTC
*** Bug 450387 has been marked as a duplicate of this bug. ***
Comment 7 Till Schäfer 2022-02-16 15:37:52 UTC
I can confirm the bug using version 21.12.2. However, I would like to add that the clipboard is actually available for a short period of time (2 seconds or so here). Thus, pasting works, but stops afterwards. This delay may be because the plugin needs some time for the sync, i.e., the bug is only triggered after the other computers response is returned.
Comment 8 Till Schäfer 2022-02-16 15:41:05 UTC
I think we should raise the importance to high, as this a real showstopper to plasma and the cause is really hard to find.
Comment 9 Fushan Wen 2022-06-02 08:22:52 UTC
Should be fixed after the plugin is ported to KGuiaddons.