Bug 470057

Summary: Shared Clipboard of Wayland applications is not working for VMs
Product: [Plasma] kwin Reporter: sac <milakam>
Component: wayland-genericAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED UPSTREAM    
Severity: normal CC: aleixpol, enc0re, nate, xaver.hugl
Priority: NOR Keywords: wayland
Version: 5.24.0   
Target Milestone: ---   
Platform: Other   
OS: All   
URL: https://gitlab.freedesktop.org/spice/linux/vd_agent/-/issues/26
See Also: https://bugs.kde.org/show_bug.cgi?id=462093
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description sac 2023-05-20 18:08:50 UTC
STEPS TO REPRODUCE
1. install vanilla Kubuntu 23.04 in a virtualbox VM
2. install virtualbox guest additions & enable shared clipboard between host & VM
3. configure Kubuntu to start in Wayland and reboot

OBSERVED RESULT
it's possible to copy & paste values in xWayland applications (e.g. FF in X mode) from host to VM and vice versa. Copy & pasting in native wayland applications fails.

EXPECTED RESULT
should be possible to use copy & paste for Wayland VMs. See also the upstream bug for Wayland to provide an API for VM (virtualbox & VMWare). However, plain Ubuntu (gnome Wayland) is able to sync the wayland & x clipboard so that it's possible to use the shared clipboard in VMs. For compatibility, it would be awesome if Kubuntu could sync to the x clipboard completely, too.
Comment 1 sac 2023-10-02 18:30:55 UTC
Wayland & clipboard should be synced, as this was implemented here:
https://phabricator.kde.org/D1973
https://blog.martin-graesslin.com/blog/2016/07/synchronizing-the-x11-and-wayland-clipboard/
Comment 2 Marek 2024-05-13 11:55:08 UTC
Fresh install of Debian 12 with KDE in VMware, fully updated, Windows 11 host. 

Clipboard doesn't work in wayland native apps. It works when copy/paste from Windows to KDE VM to lets say Firefox, Chrome, but doesn't work to Konsole, LibreOffice, Dolphin, etc.

KDE Plasma: 5.27.5
KDE Frameworks: 5.103.0
QT: 5.15.8
Kernel: 6.1.0-18
Comment 3 Marek 2024-06-06 12:56:45 UTC
In my case, installing package wl-clipboard solved issue.
Now it works from/to VM from wayland native and non-native apps.
Comment 4 Marek 2024-06-06 12:59:12 UTC
(In reply to Marek from comment #3)
> In my case, installing package wl-clipboard solved issue.
> Now it works from/to VM from wayland native and non-native apps.

Not true, after reboot it logged me into X11.
Clipboard still not working, even after installing wl-clipboard package.
Comment 5 Marek 2024-06-09 12:12:18 UTC
BTW, clipboard doesn't work in KDE 6.x under Wayland.
Comment 6 Nate Graham 2024-12-18 20:37:07 UTC
Is it still happening in Plasma 6.2.4 or later?
Comment 7 sac 2024-12-18 22:37:42 UTC
Still not working in Plasma 6.2.5 (neon-testing-20241217-0034.iso).
Copying from Windows Host to Guest is working, but not from Guest (Dolphin adressbar selection) to Windows 10 host (VirtualBox v.7.1.4).
Comment 8 Zamundaaa 2024-12-18 23:33:44 UTC
This is not a bug in KWin, but a bug in vdagent, see https://gitlab.freedesktop.org/spice/linux/vd_agent/-/issues/26