| Summary: | Cannot copy from wayland application under KDE guest VM to host | ||
|---|---|---|---|
| Product: | [Plasma] kwin | Reporter: | jackyzy823 |
| Component: | xwayland | Assignee: | KWin default assignee <kwin-bugs-null> |
| Status: | RESOLVED DUPLICATE | ||
| Severity: | normal | CC: | 4wy78uwh, elias, xaver.hugl |
| Priority: | NOR | ||
| Version First Reported In: | unspecified | ||
| Target Milestone: | --- | ||
| Platform: | Other | ||
| OS: | Linux | ||
| See Also: | https://bugs.kde.org/show_bug.cgi?id=470057 | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
|
Description
jackyzy823
2025-10-04 12:54:32 UTC
Some good useful commits: https://invent.kde.org/plasma/kwin/-/commit/947d2c5ad0746d807b04f6bb382e1d4ddb1b7f29 > Regarding snooping clipboard contents, our SelectionRequest handler has a guard to protect us against that case. https://invent.kde.org/plasma/kwin/-/commit/760e35065ed8b5f570f757cc464473b5f75a3c5b > X11 did not have a requirement that apps needed keyboard focus to update a clipboard. Apps could copy things on click. With context menus and grabs there can be no active window at this point. > Kwin tried to retrofit a requirement, which doesn't work in all cases. > Whilst there are security implications of reading a clipboard there are no security issues about pushing a new clipboard. Gnome also allows X11 apps to push to the clipboard at any point. This commit ease the limitation for copy from host to guest. https://invent.kde.org/plasma/kwin/-/commit/6e08fb2fa5f6f2d03d9ad5ef74519295357c6ba2 https://invent.kde.org/plasma/kwin/-/commit/2776f829efbd0915039e8e4200de6625772b9734 Switch from x sync helper to built in. > 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)
Edit: wayland compositors should have and enable xwayland feature. otherwise x11 clipboard doesn't exists.
Add a see also to bug 470057 and i don't think this is a vdagent only bug. It's up to spice-vdagent to fix its Wayland support, we will not add very bad workarounds for this. *** This bug has been marked as a duplicate of bug 470057 *** So even spice-vdagent implement wayland support , what about open-vm-tools ? what about virtualbox-guest-additions ?
--------------------
I think since kwin chooses to sync clipboard from wayland land to x11 land, then it should follow x11 rules.
------------------------
> we will not add very bad workarounds for this.
Another question is that:
**Does the security limitation really help?**
If a malicious program wants to steal wayland clipboard content, it could do it via `ext-data-control` protocol very very easily (just like wl-paste) , this makes the guard in x11 part like a joke.
It does not matter if other tools need to add Wayland support as well. Do not reopen this bug report again.
> If a malicious program wants to steal wayland clipboard content, it could do it via `ext-data-control` protocol
No, because it's a privileged protocol, and can be filtered out for sandboxed applications.
Ok i won't reopen this.
> No, because it's a privileged protocol, and can be filtered out for sandboxed applications.
So could we implement a mechanism to allow user to choose which program could get clipboard content without active window? Does this sound reasonable ?
(In reply to jackyzy823 from comment #7) > So could we implement a mechanism to allow user to choose which program > could get clipboard content without active window? Does this sound > reasonable ? I'd support that. I think it'd require a new FR, though. > | What | Removed | Added |
> |------------|----------|-------|
> | Resolution | UPSTREAM | FIXED |
This isn't FIXED. I think this should be set back to DUPLICATE, like it originally was.
> filtered out for sandboxed applications. I still don't get the point. :( Did you mean flatpak? Could you help to point out the related document about the filter ? I couldn't find document about how to restrict a non-flatpak progam to use `ext-data-control` to visit flatpak application's clipboard. or settings to disable flatpak application to visit clipboard. or is this something not implemented yet but planned to ? *** This bug has been marked as a duplicate of bug 470057 *** (In reply to jackyzy823 from comment #10) You might get a little more success at KDE's Discourse instance. Generally, that's the place to go before filing a bug, to ensure that its premise is correct. |