Copy and paste not working

Discussions related to using VirtualBox on Mac OS X hosts.
Post Reply
JJFlash
Posts: 6
Joined: 3. Nov 2018, 00:17

Copy and paste not working

Post by JJFlash »

Hi. I-m running Linux Debian 10 (Buster) guest on osx 10.13.6 host. Virtualbox Version is 5.2.20 r125813.
VBoxGuestAdditions-5.2.20 are installed from ISO image. Shared clipboard is set as “Bidirectional” (this is reported also from Machine -> Session Information).

When guest Debian is running the following happens:
- Cut and paste from host to guest doeesn't work
- Cut and paste from guest to host doesn’t work
- Cut and paste from host to host doesn’t work (cut and paste doesn’t work in/between any osx application)
- Cut and paste inside the guest works ok.

When I shut down the guest Debian 10 cut and paste from host to host works ok.
If I start the guest in headless mode, Cut and paste from host to host works as well.

What am I missing/misconfiguring? Have you got any clues in order to get copy and paste operation right?
Any suggestion very welcome!
socratis
Site Moderator
Posts: 27330
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: Copy and paste not working

Post by socratis »

JJFlash wrote:- Cut and paste from host to host doesn’t work (cut and paste doesn’t work in/between any osx application)
Whoa!!! That's a red flag right there! :shock:
What's going on with your host, so that the clipboard doesn't work on your host? Something funny, I can bet you. The problem is that I have no clue what that "funny" might be.

Start with what you might have changed in your system. Software that's low level. For start, post the output of:
  • kextstat | grep -v com.apple
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.
JJFlash
Posts: 6
Joined: 3. Nov 2018, 00:17

Re: Copy and paste not working

Post by JJFlash »

Thanks for your attention, Socratis.

Please find the attached file with the output of "kextstat | grep -v com.apple".

I ran the command three times:
1 - after booting the Mac. No virtual box running. Cut and paste ops in osx works ok.
2 - after starting Virtualbox guest. Cut and paste not working inside osx host nor between host and guest (works only inside the guest)
3 - after guest's shutdown. Cut and paste again ok inside osx.

The three outputs are identical, so I attach only the first.

Please consider that I'm completely new to osx and virtualbox (I've only little experience with Win, Linux and VmWare).
I bought a second hand Mac few days ago from a colleague and just installed MacTex, GarageBand and iMovies. And of course Virtualbox. I'm very perplexed ..
Index Refs Address            Size       Wired      Name (Version) UUID <Linked Against>
  167    3 0xffffff7f833ef000 0x64000    0x64000    org.virtualbox.kext.VBoxDrv (5.2.20) 649EEF26-CE94-3CCB-9483-F45AF5D03861 <7 5 4 3 1>
  172    0 0xffffff7f83453000 0x8000     0x8000     org.virtualbox.kext.VBoxUSB (5.2.20) 40399AFF-0F44-31E1-A59F-009878526CF6 <171 167 64 7 5 4 3 1>
  173    0 0xffffff7f8345b000 0x5000     0x5000     org.virtualbox.kext.VBoxNetFlt (5.2.20) 1A1F2A40-81AC-3E0B-B11E-A060E3D83B30 <167 7 5 4 3 1>
  174    0 0xffffff7f83460000 0x6000     0x6000     org.virtualbox.kext.VBoxNetAdp (5.2.20) 9B32F3D8-5F01-3440-81A3-172DC086DE59 <167 5 4 1>
Last edited by socratis on 3. Nov 2018, 20:38, edited 1 time in total.
Reason: Replaced attachment with actual text.
socratis
Site Moderator
Posts: 27330
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: Copy and paste not working

Post by socratis »

JJFlash wrote:I bought a second hand Mac few days ago from a colleague and just installed MacTex, GarageBand and iMovies
Did you try re-installing OSX? I honestly don't know what to tell you. I'm perplexed as well by this, mainly because I haven't heard about such behavior before...

I would also like to see a complete VBox.log, from a complete VM run:
  • Start the VM from cold-boot (not from a paused or saved state) / Observe error / Shutdown the VM (force close it if you have to).
  • With the VM completely shut down (not paused or saved), right-click on the VM in the VirtualBox Manager and select "Show Log".
  • Save only the first "VBox.log", ZIP it and attach it to your response. See the "Upload attachment" tab below the reply form.
I would also like to see the "recipe" of the VM, the ".vbox" file:
  1. Right-click on the VM in the VirtualBox Manager. Select "Show in Finder/Explorer/Whatever".
  2. ZIP the selected ".vbox" file and attach it to your response.
Image
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.
JJFlash
Posts: 6
Joined: 3. Nov 2018, 00:17

Re: Copy and paste not working

Post by JJFlash »

I attach the log run ad the "receipt".

I have noticed no errors during vm run.
To be more precise, copy and paste in the host osx stops working not after the vm is started, but after a login is made in the guest machine. Maybe at login time the guest loads some piece of Vboxguest addition that has weird behaviour under some circumstances ...

Well, of course I've performed a full reinstallation of osx and upgrade to latest available version, after I took the MacBook from my colleague (but not after having installed VirtualBox).

Thank you very much for your kind interest.
Attachments
Debian10.vbox.zip
VM's recipe
(2.05 KiB) Downloaded 324 times
Debian10-2018-11-04-15-15-08.log.zip
Complete run log
(27.93 KiB) Downloaded 355 times
socratis
Site Moderator
Posts: 27330
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: Copy and paste not working

Post by socratis »

<ExtraDataItem name="GUI/Fullscreen" value="true"/>
00:00:01.265794 GUI: UIMachineLogicFullscreen::sltHandleNativeFullscreenWillEnter:
    Machine-window #0 will enter native fullscreen
You're entering FullScreen from the get go. I have a feeling that your host isn't losing its Copy/Paste (C/P) functionality, but that somehow you're mistaking what might be normal behavior as an erroneous one. Can you describe what you're doing and how?
  • How are you switching to the host and test the C/P functionality?
  • Do you have two or more monitors (doesn't look like it)?
  • Do you use multiple spaces? How do you switch between them?
  • Do you have the same behavior if you switch to a windowed mode (Normal mode)?
<Machine name="Debian10" OSType="Debian_64" ...>
<Image location="/Users/baro/Downloads/debian-buster-DI-alpha3-amd64-netinst.iso"/>
Is that pre-release Debian?
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.
JJFlash
Posts: 6
Joined: 3. Nov 2018, 00:17

Re: Copy and paste not working

Post by JJFlash »

  1. How are you switching to the host and test the C/P functionality?
    I switch with command+tab keys. I test C/P selecting from a window (host or guest) and then copying with right-click or edit menu, then pointing the focus of the mouse on target windowand pasting with right-click or edit menu.
  2. Do you have two or more monitors (doesn't look like it)?
    Only one monitor.
  3. Do you use multiple spaces? How do you switch between them?
    Indeed I used two spaces. For sake of simplifying, I deleted the second space and have tried again with only one space defined: no difference from that I have reported in my original post.
  4. Do you have the same behavior if you switch to a windowed mode (Normal mode)?
    Do you mean seamless mode? Yes, I observe the same behavoir I seamless mode.
Yes, Debian 10 (code name Buster) is at the moment the so called "testing" release, in the Debian lifecycle.
You're entering FullScreen from the get go. I have a feeling that your host isn't losing its Copy/Paste (C/P) functionality, but that somehow you're mistaking what might be normal behavior as an erroneous one. Can you describe what you're doing and how?
You see, it's a fact that, for example, I cannot perform in this very Safari windows C/P to reply to posts while Virtualbox gets is running (with a logged user). I have to shut down it in order to have Edit->Copy, Edit->Paste work again.
Last edited by socratis on 4. Nov 2018, 23:35, edited 1 time in total.
Reason: Fixed formatting.
socratis
Site Moderator
Posts: 27330
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: Copy and paste not working

Post by socratis »

Something doesn't add up...

First of all, if you're using FullScreen mode, then you're using an extra Space, so you can't "remove" that space as long as you're running in FullScreen mode. I want you to try Normal mode (not Seamless), by switching using the HostKey+F key, by default that's the LeftCmd (the left Apple key), and try it like that.

Second, you can't simply switch to the host by using the Cmd+Tab, because the VM has the keyboard focus. You need to unfocus the keyboard by pressing the HostKey once, then the Cmd+Tab is grabbed by the host and not the VM. You can see whether the VM has the focus or not by looking at the bottom-right side of the window when in Normal mode.
  • Captured: Image
  • Uncaptured: Image
Third, I want you to create a new VM, a DOS VM. Accept all the defaults, launch it, let it fail with the "FATAL: No bootable medium found!". See if you can replicate 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.
JJFlash
Posts: 6
Joined: 3. Nov 2018, 00:17

Re: Copy and paste not working

Post by JJFlash »

First ... and second.
I was indeed using the left Apple Key to switch. Anyway I repeated the test in windowed mode also (sorry for having mistaken with seamless). During the test I have checked the status of Captured and uncaptured, as per your suggestion and verified that was congruent.

I write down again what I 'm experiencing:

When guest Debian is running but no user has logged in:
- Cut and paste from host to host works OK (cut and paste worka in/between any osx application)

When any user is logged in in the guest Debian the following happens, both in windowed, seamless and full screen mode:
- Cut and paste from host to guest doeesn't work
- Cut and paste from guest to host doesn’t work
- Cut and paste from host to host doesn’t work (cut and paste doesn’t work in/between any osx application)
- Cut and paste inside the guest works ok.

If I kill the two processes VBoxClient --clipboard, with any user logged in in the guest Debian the following happens, either in windowed, seamless and full screen mode:
- Cut and paste from host to guest doesn't work (this is of course expected).
- Cut and paste from guest to host doesn’t work (this is of course expected)
- Cut and paste from host to host works OK (cut and paste works in/between any osx application)
- Cut and paste inside the guest works ok.

When I shut down the guest Debian 10 cut and paste from host to host works ok.
Third
With test dos machine running, copy and paste in host system works OK, no matter in which mode is running(windowed or full screen)

If of some use, I attach a log file created on the guest as described in https://www.virtualbox.org/wiki/X11Clipboard. Unfortunately I-m not able to give any correlation between the contents of the log and what I performed, because the program had been logging almost continuously.
Attachments
clipboard-dbg.log.zip
(3.15 KiB) Downloaded 310 times
socratis
Site Moderator
Posts: 27330
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: Copy and paste not working

Post by socratis »

So, in summary you're telling me that the Guest Additions make your host's clipboard non-operational. Puzzling, really puzzling...

Can you do a quick test? Go to the VirtualBox Preferences » Input » Virtual Machine » Host Key Combination. Click on the right of the "Host Key Combination" where it should say "Left ⌘", the box will wait for your next key. Press the RightCmd, or the RightAlt key to change the HostKey. Try again.

And finally, what's your keyboard layout? And in your guest?
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.
JJFlash
Posts: 6
Joined: 3. Nov 2018, 00:17

Re: Copy and paste not working

Post by JJFlash »

As the problem arises when a user logs in in the guest, I had a look of what this good Debian fellow does after someone logs in, and I start killing some of the processes it starts, except "/usr/bin/VBoxClient --clipboard" ( Great! Now I can copy and paste as I wish!).

I have realised that as soon as I kill a process named "clipit" copy and paste from host to host and host to guest and vice versa goes alright.
These are the details of the package:
apt-cache show clipit
Package: clipit
Version: 1.4.4-2
(https://packages.debian.org/sid/main/clipit).

Out of curiosity, I tried to run again VBoxClient in debug mode. The log file is much more neat than yesterday
(for example you can see in the attached file how I copied and pasted the string "VirtualBox community"). I'm strongly inclined to think that clipit performs unnecessary and somewhat destructive accesses to memory area of the guest clipboard. Is a fact, however, that also the osx host functionality is affected as well.

To me, nothing else remains but thanking you for your kind and patient support.
Attachments
clipboard-dbg-ok.log.zip
(687 Bytes) Downloaded 266 times
Post Reply