19

I installed Ubuntu 18.04 LTS inside VirtualBox 5.1.26. I installed guest additions, enabled clipboard sharing and rebooted the guest VM. However, clipboard sharing doesn't work. How can it be fixed?

24

The problem is old version of VirtualBox that has the old guest additions version. Updating VirtualBox to 5.2.8 helps in this case. After updating VirtualBox, the guest additions must be updated in the following way:

  • Do sudo apt install linux-headers-$(uname -r) build-essential dkms if not done already.
  • Select Devices -> Insert Guest Additions CD Image... from VirtualBox VM menu
  • Follow the instructions
  • Eject the CD from Ubuntu after installation is done
  • Reboot the Ubuntu guest VM
  • Select Devices -> Shared Clipboard -> Bidirectional from VirtualBox VM menu to ensure clipboard sharing is enabled

Now shared clipboard should work.

23

The problem is with the virtualbox-guest-x11 package missing.

Execute the below commands:

sudo apt-get update
sudo apt-get install virtualbox-guest-x11

If it asks you about keeping a file or installing the new one, select the new one.

sudo VBoxClient --clipboard

This should enable clipboard sharing. Make sure that Clipboard Sharing is set to Bidirectional under VM Settings in VirtualBox as seen here:

Clipboard Sharing in VirtualBox

  • 1
    This solution worked for me (Win 10 host + Xubuntu 18) – Alex Apr 3 at 9:54
  • This solution worked for me (Host: Ubuntu 15.10, guest: Ubuntu 18.10). I needed to run all 3 commands and to say YES for the answer about maintain or replace a file. Thanks – user2342558 May 9 at 8:39
  • After I use aptitude to install virtualbox-guest-x11, it freezes my ubuntu 18.04 64bits. Now I need to reinstall ubuntu 18.04. – sam May 13 at 7:56
0

If it doesn't work after installing Guest Additions, just remove the Virtual Optical Disk from the Virtual Drive.

Go to VM. Settings > Storage > Click on the disk icon (next to a file with the name ending in .iso) > Click on the disk shape in the right pane > select the option "Remove Disk From Virtual Drive".

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.