Hi,
I struggled with this for several days and tried everything, but nothing seems to work. I cannot successfully set shared clipboard between host
and guest machines when both run Wayland desktop.
My current setup:
Host machine: Debian 12.9
Desktop environment: KDE Plasma on default Wayland and SDDM
Installed packages related to KVM: qemu-system, libvirt-daemon-system, virt-manager
Guest machine: Debian 12.9
Desktop environment: KDE Plasma on default Wayland and SDDM
During guest installation qemu-guest-agent package has been
automatically installed.
After such fresh installation shared clipboard does not work between
host and guest.
So I cannot copy some text to clipboard on host machine and paste it on guest machine.
Then I applied the following procedure to have shared clipboard working between host(wayland) and guest(X11):
1. On guest machine installed spice-vdagent package
2. On guest machine edit file /etc/xdg/autostart/spice-vdagent.desktop
and comment-out the line with "X-GNOME-Autostart-Phase=WindowManager"
3. Finally restart guest machine and login to X11 desktop session
Shared clipboard does not work when guest is on Wayland session while it works fine when guest is on X11 session.
It seems spice-vdagent supports X11 only...
Are there any other solutions I can try to make it working with both machines on Wayland sessions?
Best regards,
Rafal
[...]Welcome to Wayland !
I mostly use XFCE with X11, for both Host and Guest
and let me know if you find this too.I also found that "Resize to VM", does not work either, please test
solution? If you can, please test Gnome-Wayland to see.I would like to test Gnome-Wayland to see if they have found a
Maybe these issue are limitations with Wayland
features work under Wayland and KDE's compositor?or as you suggested, spice has not found a way to make these
Hello George,test
>> Welcome to Wayland !
[...]
>> I mostly use XFCE with X11, for both Host and Guest
:-D
>> I also found that "Resize to VM", does not work either, please
and let me know if you find this too.Host.
I don't know even how it should work, so I guess I don't need it.
I've got the given resolution set in Guest (FullHD) and then it is
scaled accordingly and properly to the given Guest window size in
So what does "Resize to VM" mean in that case?
From my XFCE host, I tested Debian 12 GNOME, Debian 12 KDE, Debian 12XFCE, LDME.
>> I would like to test Gnome-Wayland to see if they have found aspice-vdagent,
solution? If you can, please test Gnome-Wayland to see.
Yes, it works on GNOME-Wayland. You still need to install
but no config edit is needed.+1
But that's not a solution for me - I don't like GNOME
(Unity/Classic/Flashback/Metacity... whatever...).+1 (and I also like XFCE, simple, fast, effective)
I like KDE Plasma.
>> Maybe these issue are limitations with Wayland
I don't think so - I've found a solution based on clipboard-sync
(separate software, unfortunately not in Debian repo).
>> or as you suggested, spice has not found a way to make these
features work under Wayland and KDE's compositor?
Yes, it looks like so.
Regards,
Rafal
# env | grep -E -i 'x11|xorg|wayland'<br>XDG_SESSION_TYPE=wayland<br>XAUTHORITY=/run/user/1000/.mutter-Xwaylandauth.7X1V02<br>WAYLAND_DISPLAY=wayland-0<br><br> </div>
On Thursday, 23-01-2025 at 04:25 Rafał Lichwała wrote:
Hello George,
>> Welcome to Wayland !
[...]
>> I mostly use XFCE with X11, for both Host and Guest
:-D
>> I also found that "Resize to VM", does not work either, pleasetest
and let me know if you find this too.
I don't know even how it should work, so I guess I don't need it.Host.
I've got the given resolution set in Guest (FullHD) and then it is
scaled accordingly and properly to the given Guest window size in
So what does "Resize to VM" mean in that case?
Rafał, I agree that setting the guest VM to full screen is great at
times, but I most of my time, I run my VMs in Windows at a smaller
resolution than my main screeen.
I often use multiple VMs running at one time. As I use a large screen
I like running each VM in a separate Window at a lower resolution than
my main screen. Hence "Resize to VM" is great as it quickly sets the
VM's Window to the resolution that I had set in the VM. https://docs.redhat.com/en/documentation/red_hat_enterprise_linux/7/html/virtualization_getting_started_guide/virt-manager-user-interface-description#VM_window_menu_bar
"Resize to VM Resizes the display on the full screen to the size and resolution configured for the virtual machine."
From my XFCE host, I tested Debian 12 GNOME, Debian 12 KDE, Debian 12XFCE, LDME.
Only Debian 12 GNOME and Debian 12 XFCE would Resize to VM.
Debian 12 KDE would not, and it did not matter if I was using X11 or
Wayland, so maybe something to do with QT ?
Note: Debian 12 GNOME
# env | grep -E -i 'x11|xorg|wayland'
XDG_SESSION_TYPE=wayland XAUTHORITY=/run/user/1000/.mutter-Xwaylandauth.7X1V02 WAYLAND_DISPLAY=wayland-0
>> I would like to test Gnome-Wayland to see if they have found a
solution? If you can, please test Gnome-Wayland to see.
Yes, it works on GNOME-Wayland. You still need to installspice-vdagent,
but no config edit is needed.+1
But that's not a solution for me - I don't like GNOME
There are many reasons why I don't use GNOME.
One reason is that I read it was designed with the premise that users
only do one task at a time, hence use one program in full screen at a
time. I normally use several programs at a time, and switching between
them in GNOME is very ineffective. I prefer to have several Windows
all visible at the same time. I also like these windowed programs set
to specific sizes, causing some to be partly overlapped, hence a
Tiling Windows Manager is not for me either.
I have found GNOME to be a bit clumsy for using multiple windows
programs.
Below you said you use your VM in Full Screen. I wonder why? Would you
use each of your programs full screen too? Maybe GNOME would work
better for you than it does for me?
I have a personal interest in GUI's, usability, and how people differ
in their use computer interfaces.
(Unity/Classic/Flashback/Metacity... whatever...).+1 (and I also like XFCE, simple, fast, effective)
I like KDE Plasma.
>> Maybe these issue are limitations with Wayland
I don't think so - I've found a solution based on clipboard-sync
(separate software, unfortunately not in Debian repo).
>> or as you suggested, spice has not found a way to make these
features work under Wayland and KDE's compositor?
Yes, it looks like so.
Regards,
Rafal
>> I also found that "Resize to VM", does not work either, please test
and let me know if you find this too.
I don't know even how it should work, so I guess I don't need it.
I've got the given resolution set in Guest (FullHD) and then it is
scaled accordingly and properly to the given Guest window size in Host.
So what does "Resize to VM" mean in that case?
Rafał, I agree that setting the guest VM to full screen is great at
times, but I most of my time, I run my VMs in Windows at a smaller
resolution than my main screeen.
But that's not a solution for me - I don't like GNOME+1
There are many reasons why I don't use GNOME.
One reason is that I read it was designed with the premise that users
only do one task at a time, hence use one program in full screen at a
time.
Below you said you use your VM in Full Screen. I wonder why?
I have not tried to run Qemu in Wayland-Wayland variant, so I am not
sure if the following link from my notes would be helpful. At least it
might give some hint for debugging or some keywords to search for.
Gerd Hoffmann. Adding cut+paste support to qemu. 2021 https://www.kraxel.org/blog/2021/05/qemu-cut-paste/
(clipboard for vnc and gtk display options in addition to spice one)
Some recipes and limitation might be documented in ArchLinux wiki.
Hi,
I struggled with this for several days and tried everything, but nothing seems to work. I cannot successfully set shared clipboard between host
and guest machines when both run Wayland desktop.
My current setup:
Host machine: Debian 12.9
Desktop environment: KDE Plasma on default Wayland and SDDM
Installed packages related to KVM: qemu-system, libvirt-daemon-system, virt-manager
Guest machine: Debian 12.9
Desktop environment: KDE Plasma on default Wayland and SDDM
During guest installation qemu-guest-agent package has been
automatically installed.
After such fresh installation shared clipboard does not work between
host and guest.
So I cannot copy some text to clipboard on host machine and paste it on guest machine.
Then I applied the following procedure to have shared clipboard working between host(wayland) and guest(X11):
1. On guest machine installed spice-vdagent package
2. On guest machine edit file /etc/xdg/autostart/spice-vdagent.desktop
and comment-out the line with "X-GNOME-Autostart-Phase=WindowManager"
3. Finally restart guest machine and login to X11 desktop session
Shared clipboard does not work when guest is on Wayland session while it works fine when guest is on X11 session.
It seems spice-vdagent supports X11 only...
Are there any other solutions I can try to make it working with both machines on Wayland sessions?
Best regards,
Rafal
On 24/01/2025 14:12, Rafał Lichwała wrote:
so I am not
sure if the following link from my notes would be helpful. At least it
might give some hint for debugging or some keywords to search for.
Gerd Hoffmann. Adding cut+paste support to qemu. 2021
https://www.kraxel.org/blog/2021/05/qemu-cut-paste/
(clipboard for vnc and gtk display options in addition to spice one)
I've been there already on this page, but this blog is not clear for me. What to change and configure to make it working?
But that's the nature of blogs I think - a nice story about some subject to keep reading, but nothing concrete or applicable...
If I simply don't understand this and you can translate this blog text
to simple receipt - please help :-)
BTW - my use case is not VNC and not GTK (Qt rather), so I'm not sure
even if this text is adequate.
I have not noticed what qemu -display option you use, that is why I
added a kind of disclaimer. My guess was SPICE and since it has been deprecated, I would not be surprised by arbitrary issues with Wayland. I consider it as a necessity (a low priority task in my case) to try other
GUI options (might be even RDP). However if qemu vdagent relies on spice-vdagent then the approach described in the blog post would
unlikely help.
Maybe your issue could not be solved without adding support of Wayland
to spice-vdagent. Otherwise, in my opinion, the blog post still gives
some hints:
- check that /dev/virtio-ports/com.redhat.spice.0 is created inside the VM,
- check that system spice-vdagentd service is able to start and to run without errors,
- check the same for spice-vdagent service in user session.
I tried Wayland several times, but I have never desperately need it, so
my decisions were to give developers more time to fix various issues.
Out of curiosity I have tried to ask a search engine of qemu clipboard
in wayland issues. The result is more questions rather than answers.
- Is mutter really has some workarounds (absent in KDE and it might be decision of KDE developers) to sync Wayland and X11 clipboards? So there
is no issue with GNOME.
- Is clipboard sync is responsibility of XWayland? Is is started with
user session or on demand with some X11 application? Can spice-vdagent handle XWayland crash and restart?
On 26/01/2025 12:31, George at Clug wrote:
Today I changed my KDE host and guest VM to both use X11 and not Wayland.[...]
Cut/Paste clip board between host and guest did not work, in either direction. Very disappointing.We are going to hijack Rafał's Wayland topic for the *X11* case. Debian
12 bookworm KDE (the guest is not updated though). I do not remember if
I had any issues for this pair, works in both directions for CLIPBOARD
and PRIMARY_SELECTION. Both systems are specific to some degree: Klipper
is disabled, plasma installed with --no-install-recommends.
remote-viewer as a SPICE client. qemu:
-device virtio-serial-pci
-device virtserialport,chardev=spicechannel0,name=com.redhat.spice.0
-chardev spicevmc,id=spicechannel0,name=vdagent
-display spice-app,gl=on -vga qxl
I have no idea what is wrong in your case. See the cited text at the bottom.
XFCE supports Cut/Paste clip board between host and guest.
I should give Cinnamon a try when I get the chance.
I had various issues for different live images, but I do not remember details. Sometimes clipboard did not work, sometimes it was resize issues.
I am hoping that in the longer term future, spice-vdagent will still
be supported as I know no other way to get sound and video working to a network isolated VM.
Do you have any reason for your hope?
I have read that SPICE is not
supported in RHEL 9.
That is why I would check what is recommended for
RHEL, Fedora, Ubuntu. RedHat and Canonical certainly have customers who
need access to VM desktops.
However I am not sure if only SPICE viewers
are deprecated or it includes spice-vdagent as well.
On Sunday, 26-01-2025 at 14:47 Max Nikulin wrote:
the blog post still gives
some hints:
- check that /dev/virtio-ports/com.redhat.spice.0 is created inside the VM,
- check that system spice-vdagentd service is able to start and to run
without errors,
- check the same for spice-vdagent service in user session.
On Sunday, 26-01-2025 at 18:29 Max Nikulin wrote:
That is why I would check what is recommended for
RHEL, Fedora, Ubuntu. RedHat and Canonical certainly have customers
who need access to VM desktops.
I would expect VNC or RDP.
[...]
But if anyone was truly using Linux for remote "Virtual Desktops", I
would not expect they would not be using Spice but some proprietary
remote desktop software.
On Sun, 26 Jan 2025 19:50:23 +1100
George at Clug <Clug@goproject.info> wrote:
On Sunday, 26-01-2025 at 18:29 Max Nikulin wrote:
That is why I would check what is recommended for
RHEL, Fedora, Ubuntu. RedHat and Canonical certainly have customers
who need access to VM desktops.
I would expect VNC or RDP.
[...]
But if anyone was truly using Linux for remote "Virtual Desktops", I
would not expect they would not be using Spice but some proprietary
remote desktop software.
Why proprietary? There is a free solution: x2go
client[1] and server[2] from the Debian repository.
[1] https://packages.debian.org/bookworm/x2goclient
[2] https://packages.debian.org/bookworm/x2goserver
--
kind regards
Frank
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 546 |
Nodes: | 16 (0 / 16) |
Uptime: | 161:47:22 |
Calls: | 10,385 |
Calls today: | 2 |
Files: | 14,057 |
Messages: | 6,416,500 |