https://bugs.kde.org/show_bug.cgi?id=510225
Bug ID: 510225
Summary: Cannot copy from wayland application under KDE guest
VM to host
Classification: Plasma
Product: kwin
Version First unspecified
Reported In:
Platform: Other
OS: Linux
Status: REPORTED
Severity: normal
Priority: NOR
Component: xwayland
Assignee: [email protected]
Reporter: [email protected]
Target Milestone: ---
This is a cross post of https://bugzilla.redhat.com/show_bug.cgi?id=2016563
SUMMARY
Cannot copy from wayland application under KDE guest VM to host
STEPS TO REPRODUCE
1. Install Fedora 42 KDE guest vm in virt-manager
2. In guest vm , open KWrite and type some words, and select all and Ctrl + C
to copy thest words
3. In host (whatever OS) open any text editor, Ctrl + V to paste
OBSERVED RESULT
No text copied.
EXPECTED RESULT
Text copied from guest vm to host.
SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Fedora 42
KDE Plasma Version: 6.4.5
KDE Frameworks Version: 6.18.0
Qt Version: 6.9.2
ADDITIONAL INFORMATION
The problem is that most vm agent (spice-vdagent , open-vm-tools) could only
handle X11 clipboard events. They know nothing about wayland clipboard (unless
they implemented ext-data-control / wlr-data-control protocol )
If a wayland compositor implements features like transfering wayland clipboard
event to X11, then the vm agent will work. Gnome implemented the feature.
Kwin implemented this feature too however there's a limiation for security to
prevent snooping: if an x11 application doesn't have active windows, it won't
be able to receive wayland selection.
Here are some solutions:
1. KWin(Compositor side) : remove restrictions on no active window X11
application to receive wayland selection , ie
https://invent.kde.org/jackyzy823/kwin/-/compare/master...spice_vdagent_copy?from_project_id=2612.
Pros: 1) Works for different VM agent solution (if the agent works with x11
clipboard)
Cons: 1) security. I know there are security implications of reading a
clipboard . (However GNOME allows this)
This patch works under spice-vdagent / open-vm-tools /
virtualbox-guest-additions (7.1.6 / not work under 7.1.8+ host paste action
will hang)
2. Bridge: Use third party tools which could read from wayland clipboard (via
ext-data-control or wlr-data-control) and then set to X11 clipboard like
https://github.com/dnut/clipboard-sync
Pros: 1) Works under different Wayland compositor which supports
ext-data-control or wlr-data-control and different VM agent solution (if the
agent works with x11 clipboard)
Cons:
1) No out-of-box experience
2) not all distrubtions package similar tools and make autostart file
for them.
3. VM Agent side: update vm agent to implement either
a) like clipboard-sync get from wayland clipboard (via ext-data-control
protocol) then set to X11 clipboard
OR
b) do the thing like kwin but without restrictions.
Pros: security. accessing wayland clipboard via
ext-data-control/wlr-data-control protocol.
Cons:
1) need to be implemented in different VM agent (spice-vdagent ,
open-vm-tools and etc )
2) not all compositor support the necessary
ext-data-control/wlr-data-control protocol for the headless vm agent to get
wayland clipboard data.
4. or the dummy way: copy text from wayland application in vm to an x11
application in vm (like vscode) and then copy text from x11 application in
(can not skip this step) to host.
some more word about virtualbox-guest-additions ,
https://www.virtualbox.org/ticket/20808 says it works , but this comment
https://www.virtualbox.org/ticket/20808#comment:4 tests Kubuntu host and
Windows Guest which is not our situation. and this
https://www.virtualbox.org/ticket/20808#comment:3 may test Kubuntu host with
Ubuntu (gnome) guest, which should already works.
--
You are receiving this mail because:
You are watching all bug changes.