Score:1

shared clipboard (copy-paste) not working VirtualBox 7.0 and Ubuntu Server 20.04.5 focal

no flag

I am unable to copy and paste between Ubuntu Server 20.04 running inside VirtualBox 7.0.4 and my Mac OSX host 11.7.1. How can I make it work?

In order to paste I'm trying:

  • copy some text on my Mac
  • click inside my Ubuntu machine
  • press cmd+v, or ctrl+v, and nothing happens

What I've tried so far

  • Devices > Shared Clipboard > set to Bidirectional

  • Devices > Insert Guest Additions CD Image ...

    • this doesn't appear to have any effect

So I tried to run it manually:

sudo mkdir /mnt/cdrom
sudo mount /dev/cdrom /mnt/cdrom
# install build-essential otherwise I get errors when installing guest additions
sudo apt-get update && sudo apt install build-essential
sudo /mnt/cdrom/VBoxLinuxAdditions.run 

it produces a couple errors, but otherwise appears to install

/opt/VBoxGuestAdditions-7.0.4/bin/VBoxClient: error while loading shared libraries: libXt.so.6: cannot open shared object file: No such file or directory
VirtualBoxGuestAdditions: Starting.
...
VirtualBox Guest Additions: Building the modules for kernel 5.4.0-132-generic.
update-initramfs: Generating /boot/initrd.img-5.4.0-132-generic
VirtualBox Guest Additions: Running kernel modules will not be replaced until the system is restarted

Then I shut down and start up my virtual machine.

But I'm still not able to paste.

Next I tried installing these packages which are recommended in other answers:

sudo apt install linux-headers-$(uname -r) dkms

And then re-running

sudo mount /dev/cdrom /mnt/cdrom
sudo /mnt/cdrom/VBoxLinuxAdditions.run 

And then shutting down and starting up the VM. I'm still not able to paste.

Finally, I tried

sudo apt-get install virtualbox-guest-dkms virtualbox-guest-utils

shut down and started up my machine, but it's still not working.

What else can I try?

Terrance avatar
id flag
I have yet to get the Virtualbox Extension Pack on VB7 to actually load and work correctly. All of the VB systems I have it causes a reboot when trying to insert the Extension Pack for loading. I went and deleted it, and redownloaded it, but nothing I did could fix it. So, I went back to VB 6.1 until they can fix the VB Extensions Pack.
mark avatar
no flag
I am trying my steps above with VirtualBox 6.1 and still having the same problem
Terrance avatar
id flag
How are you trying to paste? Ctrl+V doesn't work through VB. I have only been able to get it to work through right-click for both copy from the host and to paste into the client within VB.
mark avatar
no flag
I was trying various keyboard paste shortcuts. I'm trying the mouse now but right clicking doesn't do anything in the virtual machine. I'm guessing because it's Ubuntu Server which only has a command line and no GUI or mouse integration
Terrance avatar
id flag
Yeah, that can do it. You can open a ssh session to it, and you should be able to paste into a ssh session.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.