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
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?