Strange clipboard share in VirtualBox 6 (#18285)

This is for discussing general topics about how to use VirtualBox.
agilis
Posts: 65
Joined: 21. Dec 2015, 18:46

Re: Cannot copy-paste URLs via clipboard sharing

Post by agilis »

stephanecharette wrote: • On my host, I select all of the URL in the browser and press CTRL+C.
• I move the mouse to my guest window and click in gedit.
• Then I press CTRL+V to paste. But nothing is pasted.
That's strange, I do not have any issue copying from a host to the guest.
  • Virtual Box Version 6.0.8 r130520 (Qt5.6.2)
  • Windows Host (10), Google Chrome Version 74.0.3729.131
  • Linux Guest (CentOS 7.x), Google Chrome Version 74.0.3729.169
My issue is copying the URL from the Guest to the Windows host.
jtrh
Posts: 1
Joined: 23. Jul 2019, 21:46

Re: Strange clipboard share in VirtualBox 6 (#18285)

Post by jtrh »

Hi,

Since VirtualBox 6.0.0 r127566 I've been unable to copy URLs from Google Chrome's location bar running on a Linux guest to a Windows host. Firefox and all other Linux applications work fine. Copying from the Windows host to the Linux guest also works fine, even with Google Chrome.

Host System Information:
  • OS: Windows 10 Pro 1903 64-bit
  • VirtualBox version: 6.0.10 r132072
  • Language: English (US)
Guest System Information:
  • OS: Linux, specifically Xubuntu 18.04.2 LTS 64-bit
  • VirtualBox guest additions version: 6.0.10 r132072
  • Desktop environment: Xfce 4.12
  • Language: English (US)
  • Google Chrome version: 75.0.3770.142 64-bit
  • Firefox version: 68.0 64-bit
As a workaround, between the copy-on-Linux and paste-on-Windows actions, I run the command

Code: Select all

xclip -selection clipboard -o | xclip -selection clipboard
which "re-copies" what's in the guest's clipboard. It has worked every time, but it's very annoying.
Osgpcq
Posts: 4
Joined: 27. Mar 2019, 17:15

Re: Strange clipboard share in VirtualBox 6 (#18285)

Post by Osgpcq »

Hi,

I'm checking each new version of VB6. Today test:
  • F30 with VB6.0.12 r133076 with F30VM GA6.0.12:
    • But now copy from chromium Version 75.0.3770.100 (host) to the VM is working.
    • Still not working from chrome 76.0.3809.132 (VM) to the host.
      => so now the problem is only from one side :)
Old test: With different GA version and side problem:
  • F29 with VB6.0.4 with F27VM GA 5.2.8:
    • Copy paste problem from chrome 73.0.3683.86 and 70.0.3538.77 (Host) to the VM.
    • Copy paste from chrome (VM) to the host is ok. <------------------------
  • F29 with VB5.2.26 with F29VM GA 6.0.4;
    • Copy paste from chrome 73.0.3683.86 (Host) to the VM is ok. <--------------------------
    • Copy paste problem from chrome (VM) to the host .
Best regards
Vince

PS:
  • F29+vb6+F29VM(GA 6.0.4): (VM Chrome Version 73.0.3683.86 (Official Build) (64-bit) )
    • Copy paste problem from URL bar of chrome (Host) to the VM.
    • Copy paste problem from URL bar of chrome (VM) to the host.
  • F29+vb6+F27VM (GA 5.2.8) (VM chrome 73.0.3683.86 and 70.0.3538.77)
    • Copy paste problem from URL bar of chrome (Host) to the VM.
    • Copy paste from URL bar of chrome (VM) to the host is ok.
  • F29+vb6+F27VM (GA6.0.4) (VM chrome 73.0.3683.86 and 70.0.3538.77)
    • Copy paste problem from URL bar of chrome (Host) to the VM.
    • Copy paste problem from URL bar of chrome (VM) to the host.
  • F29+vb5.2.26+F29VM GA6.0.4 (VM Chrome Version 73.0.3683.86 (Official Build) (64-bit) ).
    • Copy paste from URL bar of chrome (Host) to the VM is ok.
    • Copy paste problem from URL bar of chrome (VM) to the host .
  • F29+vb5.2.26+F29VM GA5.2.26 (VM Chrome Version 73.0.3683.86 (Official Build) (64-bit) ).
    • Copy paste from URL bar of chrome (Host) to the VM is ok.
    • Copy paste from URL bar of chrome (VM) to the host is ok.
  • F29+vb5.2.26+F27VM GA5.2.8 (VM Chrome Version 70.0.3538.77 (Official Build) (64-bit) and Version 73.0.3683.86 (Official Build) (64-bit)).
    • Copy paste from URL bar of chrome (Host) to the VM is ok.
    • Copy paste from URL bar of chrome (VM) to the host is ok.
Last edited by socratis on 12. Dec 2019, 08:01, edited 1 time in total.
Reason: Fixed formatting.
Osgpcq
Posts: 4
Joined: 27. Mar 2019, 17:15

Re: Strange clipboard share in VirtualBox 6 (#18285)

Post by Osgpcq »

Hi,

About copy/paste problem with Chrome:
[list]
[*]VB6.0.14 r133895 and GA 5.2.34r133893 : From Chrome VM to host it's ok (Fedora 30 VM and Host).
[*]VB6.0.14 r133895 and GA 6.0.14r133893 : Not working in both side (Fedora 30 VM and Host).
[/list]
How can we help you to diagnose deeper the problem ?

Best regards
Vince
stephanecharette
Volunteer
Posts: 300
Joined: 10. Nov 2007, 22:03
Primary OS: Ubuntu other
VBox Version: PUEL
Guest OSses: Ubuntu-64bit, Windows
Location: Kelowna, British Columbia, Canada
Contact:

Re: Strange clipboard share in VirtualBox 6 (#18285)

Post by stephanecharette »

On Nov 25, this was posted to the VB dev mailing list:
I noticed that copying from the omnibar in Google Chrome in a linux guest (Ubuntu or Centos) didn’t allow pasting into the host, despite (a) pasting in the guest working fine, and (b) copying from elsewhere in the guest (including from the body of Google Chrome pages) works fine and allows pasting in the host.

To cut a long-ish story short, the problem boils down to “Google Chrome grabs the clipboard twice when you copy from the omnibar”, which is fine from their end (if a little weird) but VBoxClient doesn’t handle this correctly (see attached xtrace output with inline comments) since it calls into `XtGetSelectionValue` twice before handling the first answer, and `XtGetSelectionValue` doesn’t appear to be re-entrant so it ends up reporting that there are no allowed formats for the clipboard when the second callback fires.

Back in VBox < 5.2, there was some code to prevent this re-entrancy, but it was `ifndef`’d out in 5.2 and has been deleted completely in the recent changes to the Shared Clipboard, but it seems that this defensive code is still needed. I’ve attached a patch to re-add the logic, which I hereby release under the MIT license.
The next day, Andreas Löffler posted this follow-up:
thanks for the pointer and the attached patch -- this code indeed was
ifdef'ed a long time ago and recently removed. I'll have a peek at the
issue and re-add it eventually.
There haven't been any updates since. We're all crossing our fingers that the copy-paste issues with Chrome will be fixed at the next update, especially since this is an obvious regression.
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Strange clipboard share in VirtualBox 6 (#18285)

Post by socratis »

stephanecharette wrote:There haven't been any updates since.
Actually they have... 6.1.0 came out...
Give it a try...
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
stephanecharette
Volunteer
Posts: 300
Joined: 10. Nov 2007, 22:03
Primary OS: Ubuntu other
VBox Version: PUEL
Guest OSses: Ubuntu-64bit, Windows
Location: Kelowna, British Columbia, Canada
Contact:

Re: Strange clipboard share in VirtualBox 6 (#18285)

Post by stephanecharette »

Oh, I see what happened, 6.1 came out last night, but the package name changed from virtualbox-6.0 to virtualbox-6.1, which is why "check for update" is telling me there are no new updates.

Why was 6.1 not announced on the VB dev mailing list? (Did I miss it?)

Stéphane
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Strange clipboard share in VirtualBox 6 (#18285)

Post by socratis »

stephanecharette wrote:Disingenuous, Socratis. 6.1 isn't out yet, though it looks like it will be out at some point tonight
Seriously now? Are you kidding me? I point you to the actual files and you're calling me "Disingenuous"? :roll:
 Edit: I see you edited your message while I was replying. Better. Much better... 
stephanecharette wrote:Why was 6.1 not announced on the VB dev mailing list? (Did I miss it?)
Because it was too late in the night and the announcements will come today.
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
dblagbro
Posts: 3
Joined: 22. Apr 2010, 16:30
Primary OS: Ubuntu other
VBox Version: PUEL
Guest OSses: win - xp, vista, & 7

Re: Can not copy page URL from Google Chrome (host) to notepad (guest)

Post by dblagbro »

Apparently it's also happening on Chromium... which I believe to be an open source version of Chrome if I understand correctly? ... any work around known?
multiOS
Volunteer
Posts: 831
Joined: 14. Sep 2019, 16:51
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: WIN11,10, 7, Linux (various)
Location: United Kingdom

Re: Can not copy page URL from Google Chrome (host) to notepad (guest)

Post by multiOS »

@dblagbro,

You've got them the wrong way round. Chromium is indeed open source (development largely funded by Google), but it is the basis for Google Chrome and all other Chromium-based browsers. What is a problem in Chromium will inevitably be a problem in all related browsers and here, the problem is that 'text' copied directly from the Chromium-based browser screen will not be be plain text as it contains 'special' formatting codes for browser display. So the only workarounds are:
  1. use a non-Chromium-based browser that doesn't suffer the same problem; such as Firefox, as mentioned above; or
  2. If on Windows, you could use the 'Pure Text' freeware utility - https://stevemiller.net/puretext/ - which can strip any formatting code from Web Browser text and from various other products; or
  3. First paste the text copied from the 'Chromium-based' Browser into a Plain Text Editor such as Notepad (if on Windows) which will also strips out formatting codes; and then re-copy the plain text from the Text Editor to copy between Host & Guest or vice-versa.
Dan P
Posts: 36
Joined: 23. Dec 2019, 18:33

Cannot copy URLs .... directly from VBox to Windows host.

Post by Dan P »

I haven't tried it on 6.1 but on all the 6.0.x versions... I found that even though I have the Shared Clipboard direction set to BiDirectional ... I could not directly copy any u.r.l directly off of a Linux/Ubuntu guest VBox browser - into Windows. I would try to paste, and would get the message: No Text in Clipboard.

But here's the trick :) .. In the Linux machine...If I copy the U.R.L into anything else first- even into the search field in YouTube, the Pluma editor, etc... then copy it again from there... the text copied is found in the Windows clipboard and is past'able' in Windows.

Just try it... you will see that it works as described.

- - - - - - - - - - - - - - - - - - - - - - - - -
Note: periods are put into u.r.l because there a message comes up saying that I cannot post them until I post at least one message.

- - - - - - - - - - - - - - - - - - - - - - - - -
By the way... Thank You for a great tool- VBox... It used to hang daily... until the processor settings etc were tweaked... Now it works pretty smoothly. No hangs.
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Cannot copy URLs .... directly from VBox to Windows host.

Post by socratis »

Dan P wrote:I could not directly copy any u.r.l directly off of a Linux/Ubuntu guest VBox browser - into Windows
Let me take a wild guess... that browser is Chrome, right? ;)

Known issue with Chrome, see https://www.virtualbox.org/ticket/18285 and the discussion mentioned there. In fact I'm going to merge your post with the most prominent thread on the issue.
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Strange clipboard share in VirtualBox 6 (#18285)

Post by socratis »

Merged a couple of threads, and moving the whole thing to "Using VirtualBox" since this is not Host-, or Guest-specific.
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Strange clipboard share in VirtualBox 6 (#18285)

Post by socratis »

@'Dan P'
I already replied to you and merged your post with the thread that deals with the issue. Not sure why you had to post a duplicate, but keep in mind that according to the The Forum Posting Guide, duplicate posts are not allowed. Your duplicate has been removed.
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
C0RD
Posts: 1
Joined: 24. Feb 2020, 16:18

Re: Strange clipboard share in VirtualBox 6 (#18285)

Post by C0RD »

Virtualbox 6.1.4
Host: Win10
Guest: Debian unstable
Browser: Chrome / Chromium / Chromium based.

As described above:
Copy&Paste of U R L from Browser to local window --> working
Copy&Paste of U R L from local window to Host --> working
Copy&Paste of U R L from Firefox to Host --> working
Copy&Paste of U R L from Browser to Host --> not working

Workaround: starting Browser with option --disable-features=OmniboxCanCopyHyperlinksToClipboard
Copy&Paste of U R L from Browser to Host --> working
Post Reply