Bug 464811

Summary: Using Wayland display manager, KGpg says the clipboard is empty even when it is not
Product: [Applications] kgpg Reporter: Daniel Melzak <daniel+kde>
Component: generalAssignee: Rolf Eike Beer <kde>
Status: CONFIRMED ---    
Severity: minor CC: buyer, kurz, LucasHenderson
Priority: NOR    
Version First Reported In: 24.12.1   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Daniel Melzak 2023-01-25 17:12:30 UTC
SUMMARY

On Fedora 37 using the Plasma on Wayland, if there is an encrypted message in the clipboard and clicking on the "Decrypt Clipboard" button on the applet results in a "Clipboard is empty." message.


STEPS TO REPRODUCE
1. Boot Plasma on Wayland.
2. Copy an encrypted message into the clipboard.
3. Right click on KGpg applet, click "Decrypt Clipboard"
4. Message about "Clipboard is empty." is displayed.

OBSERVED RESULT
KGpg does not seem to have access to the Clipboard, so even when there is a message to decrypt, it says the clipboard is empty.

EXPECTED RESULT
KGpg brings up the interface to display the decrypted message.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Fedora 37 KDE Plasma Workstation
(available in About System)
KDE Plasma Version: 5.26.5
KDE Frameworks Version: 5.102.0
Qt Version: 5.15.8

ADDITIONAL INFORMATION
I have cleared the clipboard so only the encrypted message is in the clipboard.
I have used the "Open Editor" interface to successfully decrypt the message.
Comment 1 Daniel Melzak 2023-01-25 18:45:33 UTC
(In reply to Daniel Melzak from comment #0)
> SUMMARY
> 
> On Fedora 37 using the Plasma on Wayland, if there is an encrypted message
> in the clipboard and clicking on the "Decrypt Clipboard" button on the
> applet results in a "Clipboard is empty." message.
> 
> 
> STEPS TO REPRODUCE
> 1. Boot Plasma on Wayland.
> 2. Copy an encrypted message into the clipboard.
> 3. Right click on KGpg applet, click "Decrypt Clipboard"
> 4. Message about "Clipboard is empty." is displayed.
> 
> OBSERVED RESULT
> KGpg does not seem to have access to the Clipboard, so even when there is a
> message to decrypt, it says the clipboard is empty.
> 
> EXPECTED RESULT
> KGpg brings up the interface to display the decrypted message.
> 
> SOFTWARE/OS VERSIONS
> Linux/KDE Plasma: Fedora 37 KDE Plasma Workstation
> (available in About System)
> KDE Plasma Version: 5.26.5
> KDE Frameworks Version: 5.102.0
> Qt Version: 5.15.8
> 
> ADDITIONAL INFORMATION
> I have cleared the clipboard so only the encrypted message is in the
> clipboard.
> I have used the "Open Editor" interface to successfully decrypt the message.

As an additional test, I have logged in under an X11 session. KGpg was able to decrypt the message from the clipboard without any issues.

I can confirm now that it is a bug with the way the program handles access to the clipboard under wayland.
Comment 2 Kevin Kurz 2024-01-26 09:56:58 UTC
I've got exactly the same issue on Kubuntu 23.10 / Mantic when using Wayland. 
Version of KGPG is 23.08.1
KDE Version 5.110.0
QT Version 5.15.10

Decrypting via copy & paste in editor also works fine.
If I switch back to X11 decrypting clipboard works fine.
Comment 3 Lucas Henderson 2025-01-23 01:33:27 UTC
I can confirm this bug is still present in 24.12.1. Right clicking the tray icon, and choosing decrypt clipboard yields a notification that the clipboard is empty.

Of likely relevant note, this issue does not occur if the text on the clipboard was originally copied from within kgpg's editor. It only happens if the clipboard contents came from a different application. Perhaps some sort of permissions issue.

If it is relevant, I am on kwin 6.2.5
Comment 4 NF Smith 2025-10-25 18:38:24 UTC
using:
Arch Linux
Kernel 6.17.5-zen1-1-zen
Wayland
kgpg 25.08.2-1
qt5-wayland 5.15.17+kde+r57-1

Still getting Clipboard is empty message when trying to decrypt using clipboard. 
Can paste encrypted text into editor and decrypt it that way, so clipboard is clearly NOT empty.

Bug 483699 submitted 2024-03-15 appears to be a duplicate of this one.