Skip to content

wayland > x11 clipboard sync not working #2562

@GoodPants

Description

@GoodPants

Describe the bug
Wayland clipboard to x11 clipboard isn't synced, but x11 to wayland is.

To Reproduce
Steps to reproduce the behavior:

:~$ echo "x11-clipboard" | DISPLAY=:1 xclip -selection clipboard -i # write to x11 clipboard
:~$ echo "wayland-clipboard" | wl-copy # write to wayland clipboard
:~$ wl-paste # output wayland clipboard contents
:~$ DISPLAY=:1 xclip -selection clipboard -o # output x11 clipboard contents

On my VM, xclip -o still returns "x11-clipboard"

Expected behavior
x11 clipboard is synced to wayland

Desktop (please complete the following information):

  • Host OS: Pop!_OS 22.04 (virt-manager+KVM/QEMU)
  • Guest OS: Pop!_OS 24.04

Additional context
This appears to be preventing guest > host clipboard sharing from working in virt-manager with Pop_OS 24 VMs. Copy/paste from host to guest works, but not from guest to host. I think this is because spice-vdagent only reads from x11 clipboard on the VM. I'm not familiar enough with that package to know if it provides wayland clipboard support.

I haven't taken the time to investigate the sync mechanism yet, but this seems like a plausible cause for several other open issues with clipboard:

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions