[SOLVED] Two-way clipboard sharing doesn't work on W10 guest on Linux host

Discussions about using Windows guests in VirtualBox.
Post Reply
avamk
Posts: 32
Joined: 7. May 2012, 23:50

[SOLVED] Two-way clipboard sharing doesn't work on W10 guest on Linux host

Post by avamk »

Hello,

I've got 64-bit Windows 10 21H2 installed as guest on Virtualbox 6.1.32 running on a Red Hat Enterprise Linux 8.5 host (Linux kernel 4.18) with Gnome 3.32.2 running in X11 mode. The latest Guest Additions are installed on the Windows 10 guest. Both host and guest are fully updated.

However, bidirectional clipboard sharing does not work between the guest and host in either direction. What's copied or cut on one is not available on the other. I've attached the VirtualBox logs in a ZIP file.

Can anyone please advise on how I can fix this? Thank you.
Attachments
VBox_logs.zip
Virtualbox 6.1.32 logs
(166.94 KiB) Downloaded 6 times
Last edited by avamk on 19. Apr 2022, 15:23, edited 1 time in total.
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Two-way clipboard sharing doesn't work on W10 guest on Linux host

Post by mpack »

What exactly are you cutting and copying? I.e. what object and what app?

I do see this in the log:
00:00:31.146306 Shared Clipboard: X11 DISPLAY variable not set -- disabling clipboard sharing
A clipboard is a feature of GUIs: both host and guest must be using GUIs, and both GUIs must have a clipboard concept. Are you running the guest in headless text mode?
avamk
Posts: 32
Joined: 7. May 2012, 23:50

Re: Two-way clipboard sharing doesn't work on W10 guest on Linux host

Post by avamk »

mpack wrote:What exactly are you cutting and copying? I.e. what object and what app?

I do see this in the log:
00:00:31.146306 Shared Clipboard: X11 DISPLAY variable not set -- disabling clipboard sharing
A clipboard is a feature of GUIs: both host and guest must be using GUIs, and both GUIs must have a clipboard concept. Are you running the guest in headless text mode?
Thank you for your response.

I am just trying to copy and paste text bidirectionally. And this problem is consistent between all apps on the host and guest.

And no, I am not running the guest in headless text mode. Windows 10 has a full GUI by default and I certainly did not turn that off (if that's even possible?). And like I said, I'm running a Gnome 3.32.2 desktop session on my host with full GUI.
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Two-way clipboard sharing doesn't work on W10 guest on Linux host

Post by mpack »

Sorry, I mispoke. I really want to know if you are running either guest or host in any unusual display mode, for example running the Linux side in text mode (I note that you have answered no), or running the VM in headless mode.

We have to account for that message in the log somehow.

One thing: I notice that you are not using an official build of VirtualBox. Instead you have an "_rpmfusion" build.
fth0
Volunteer
Posts: 5668
Joined: 14. Feb 2019, 03:06
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, ...
Location: Germany

Re: Two-way clipboard sharing doesn't work on W10 guest on Linux host

Post by fth0 »

The log message found by mpack is the key. It tells you that the environment on the host where you executed the VBoxHeadless binary didn't have the X11 DISPLAY environment variable set.

This is typically the case if you connect via SSH to your host without using one of the X11 Forwarding options. How did you log into the host?
avamk
Posts: 32
Joined: 7. May 2012, 23:50

Re: Two-way clipboard sharing doesn't work on W10 guest on Linux host

Post by avamk »

Thank you so much for your feedback.
fth0 wrote:This is typically the case if you connect via SSH to your host without using one of the X11 Forwarding options. How did you log into the host?
No, everything is local on my machine. No SSH involved.
mpack wrote:One thing: I notice that you are not using an official build of VirtualBox. Instead you have an "_rpmfusion" build.
Thanks for noticing that. I re-installed from the official repository instead, but got the same results. And I was stumped.

However... after much fiddling, I discovered that I've been starting the guest in detachable mode instead of normal mode. Once I switched to starting the guest in normal mode, bidirectional copy/paste worked! So, problem kind of solved. But is there a reason why bidirectional clipboard sharing doesn't work in detachable mode?
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Two-way clipboard sharing doesn't work on W10 guest on Linux host

Post by mpack »

user manual (startvm options) wrote: separate
Starts a VM with a detachable UI. Technically, it is a headless VM with user interface in a
separate process.
This is an experimental feature as it lacks certain functionality, such as
3D acceleration.
I think this is probably the reason.
avamk
Posts: 32
Joined: 7. May 2012, 23:50

Re: Two-way clipboard sharing doesn't work on W10 guest on Linux host

Post by avamk »

mpack wrote:
user manual (startvm options) wrote: separate
Starts a VM with a detachable UI. Technically, it is a headless VM with user interface in a
separate process.
This is an experimental feature as it lacks certain functionality, such as
3D acceleration.
I think this is probably the reason.
Aha, understood. Thank you for your help!
Post Reply