Clipboard: 'Monthly Complaint,' or 'For The Love of All That's Holy... I Need Help'

Discussions related to using VirtualBox on Linux hosts.
Post Reply
grovesp
Posts: 3
Joined: 14. Oct 2021, 18:28

Clipboard: 'Monthly Complaint,' or 'For The Love of All That's Holy... I Need Help'

Post by grovesp »

Greetings. It seemed odd that we've made it this far into October without a single bi-directional clipboard post, so it's my time to shine.

Let me preface this post with the fact that I've had this issue across multiple Virtualbox versions (5.x and 6.x) and kernel updates. Yet, it still persists. No amount of Googling, re-installing, killing and restarting processes, etc, has been successful. My hope is that I'm not alone and the application isn't just picking on me.

Host:
  • i7 Processor, 32 GB Physical Memory
  • Linux Mint 20.1 (Ubuntu 20.04) - Kernel Linux 5.4.0-86-generic x86_64 - Mate 1.24.0
  • Oracle Virtualbox v6.1.26 r145957 (Qt5.12.8)
Guest:
  • Allocated 12GB Memory, One (1) CPU with No Execution Cap
  • Windows 10.0 (Build 19042)
  • Oracle Virtualbox Guest Additions v6.1.26
Can someone steer me towards a definitive CAUSE of this issue? It really seems all over the place, and the last two Virtualbox updates have taken me from "this sometimes works," to, "not gonna happen." The content is clearly on the clipboard, and moves freely both within the guest as well as across the host. (Even across Citrix Workspace clients) -- But, no updates or re-installs have helped. I'm at the end of the rope, here, and eyeing that free copy of VMware. Someone help...

Thanks.
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Clipboard: 'Monthly Complaint,' or 'For The Love of All That's Holy... I Need Help'

Post by scottgus1 »

grovesp wrote:eyeing that free copy of VMware.
I always love it when a user of free Virtualbox who is entitled to zero support goes there... :lol:

Start the VM from full power off, not save-state.

Do a test of shared clipboard using text only. Cut/Copy from a basic text editor in the Linux host to Notepad in the VM & back.

Then shut down the VM from within the VM OS if possible. If not possible, close the Virtualbox window for the VM with the Power Off option set.

Please right-click the VM in the main Virtualbox window's VM list, choose Show Log. Save the far left tab's log, zip the log file, and post the zip file, using the forum's Upload Attachment tab.
grovesp
Posts: 3
Joined: 14. Oct 2021, 18:28

Re: Clipboard: 'Monthly Complaint,' or 'For The Love of All That's Holy... I Need Help'

Post by grovesp »

Not the first rodeo, huh? Well, I followed the board's advice and searched through ALL of the 'clipboard,' posts. And, I came upon something as I was waiting for the system to shutdown prior to zipping up the log file. A little gem that was inside my own logs all the time:

Code: Select all

00:08:10.351919 Shared Clipboard: X11 DISPLAY variable not set -- disabling clipboard sharing
All the time. Months. Years. It's been there... staring at me.

Of course, a quick search and this was most likely due to the fact that I was using the VM in detachable or headless which precluded use of the clipboard. These are my preferred starts, and the VM in question had some shortcuts created. The one that got used the most looks like this:

Code: Select all

/usr/lib/virtualbox/VirtualBoxVM --comment "Win10" --startvm "{02ebd2ad-2527-4227-900b-771edeb55aea}"
This doesn't seem to launch in detached/headless...? But, when I used the Oracle Virtualbox Manager and launched with a Normal Start, the clipboard worked fine. Is it possible my shortcut has betrayed me?

Again, back to the log:

Code: Select all

00:00:00.020081 Executable: /usr/lib/virtualbox/VBoxHeadless
It seems that while the shortcut on the desktop seemed innocent enough, what about from the mintMenu?

Code: Select all

/usr/lib/virtualbox/VirtualBoxVM --comment "jung-win10" --startvm "{02ebd2ad-2527-4227-900b-771edeb55aea}" --separate
There it is. Busted. It's my own fault. Nothing like a little separate parameter to ruin years and years of CTRL-C and CTRL-V attempts. I must have deserved this. Appreciate your quick response - hoping to dig myself out of this embarrassing hole into which I must now crawl.

LET THIS SERVE AS A REMINDER FOLKS... ALWAYS READ THE BOARD FIRST BEFORE YOU POST AND FOR PETE'S SAKES, READ YOUR LOGS.
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Clipboard: 'Monthly Complaint,' or 'For The Love of All That's Holy... I Need Help'

Post by scottgus1 »

Interesting info there! An X environment is necessary for a compatible clipboard to be present in the VM. Could very well be that such an environment on the host is required too.

FWIW Wayland may not be supported yet in the shared clipboard dept.
grovesp wrote:this embarrassing hole into which I must now crawl.
This is actually called rubber-duck debugging, and is a valid concept. I do it myself all the time.
grovesp
Posts: 3
Joined: 14. Oct 2021, 18:28

Re: Clipboard: 'Monthly Complaint,' or 'For The Love of All That's Holy... I Need Help'

Post by grovesp »

scottgus1 wrote:Interesting info there! An X environment is necessary for a compatible clipboard to be present in the VM. Could very well be that such an environment on the host is required too.

FWIW Wayland may not be supported yet in the shared clipboard dept.
Found these exact notes on the other forum post. The key is that detached and headless will not operate without the X11 environment established. So, if you're not running a Normal Start, you can't use the clipboard. The Wayland development has been ongoing, but I'm not sure what type of priority it may have based on its adoption. I may not understand the intricacies, but it certainly would be nice to have the clipboard enabled once the console attached. :)
scottgus1 wrote:This is actually called rubber-duck debugging, and is a valid concept. I do it myself all the time.
Wow. Do you know I've used that technique throughout my career? Just never knew I was speaking to a 'rubber duck' -- It's always been beneficial to me to explain something to someone else. First, so I can share it effectively, and second, so I can figure out exactly what I'm doing.

Thanks for your comments.
Post Reply