Ubuntu – VirtualBox 5.2.4 Shared clipboard not working in Ubuntu 16.04.3 LTS

clipboardvirtualbox

I have tried this:

sudo apt-get install virtualbox-guest-dkms and enabling bidirectional shared clipboard.

VirtualBox 4.12 Shared clipboard not working in Ubuntu14.04

and various other things, now hard to collect, but nothing works so far.

How to fix it?

Update

When trying to insert guest additions CD image, I get this error:

could not mount error

From this question, Unable to Install Guest Additions CD Image on Virtual Box, I tried:

installing virtualbox-guest-utils

Tried also:

sudo apt-get upgrade
sudo apt-get install virtualbox-guest-additions-iso and this gives:

already the newest version

Restarting the virtual machine did not help, no errors.

Best Answer

virtualbox-guest-dkms's version in Ubuntu 16.04.3 is 5.0.40-dfsg-0ubuntu1.16.04.2, which is the version of VirtualBox in Ubuntu's repository rather than 5.2.4. This might be causing your issue.

Try the following to install the proper version of Guest Additions:

  1. Start the virtual machine
  2. In the VirtualBox Devices menu, choose Insert Guest Additions CD image...
  3. Open a terminal by pressing Ctrl+Alt+T
  4. Run sudo apt purge virtualbox-guest-dkms
  5. Run sudo /media/$USER/VBox_GAs_5.2.4/VBoxLinuxAdditions.run
  6. Reboot

Except for step 4, it's a good idea to do this every time there's a new version of VirtualBox (step 5 should be changed to the proper path, of course).