32
9
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?
32
9
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?
40
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:
27
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:
sudo apt install linux-headers-$(uname -r) build-essential dkms
if not done already.Now shared clipboard should work.
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".
-1
NOTE: The following solution worked with the following setup:
I honestly would try THIS solution before any of the other solution, because as of Dec 15th 2019, this solution is the only one that didn't completely fail. I had the same problem that sam had (the 3rd comment in juhist's answer). After following juhist's answer my ubuntu virtualbox was completely frozen after rebooting (keyboard and mouse wouldn't work after ubuntu logged in). Luckily I made a snapshot before I executed the solution, so I rolled it back and did this instead:
Shut Down your Ubuntu Virtualbox, and make a Snapshot! That way if anything goes wrong, you can restore your working image.
After making a snapshot, start your Ubuntu virtualbox back up, open up the terminal, and execute the following:
sudo apt update
sudo apt install build-essential dkms linux-headers-$(uname -r)
FYI: $(uname -r) prints the running Kernel version.
From the virtual machine menu, click Devices -> “Insert Guest Additions CD Image”
This should mount a virtual CD/DVD drive inside the Ubuntu guest machine. When that happens, you should get a prompt to run the software. Click Run to begin the installation.
If you get an error saying the guest system has no CD-ROM, stop the virtual machine, open the virtual machine settings and from the “Storage” tab, add a new CD-ROM device to the machine by clicking on the plus sign (Adds optical device). Once done reboot the virtual machine.
Restart the guest machine and you’re set.
Still Have problems? I got most of my instructions from the following two pages. These pages have additional steps to try if the above didn't work for you.
Did you try my answer or Swapnil Goad's answer? sam's comment is not a comment to my answer, and I see your answer is very similar to mine. – juhist – 2019-12-16T09:55:30.610
I tried Swapnil's. It didn't work. For some reason, when I saw your answer below the most voted on answer, I just saw you mention "Updating VirtualBox to 5.2.8" and since I was using 6.01, I didn't want to try yet another "answer" that may have been outdated. I had tried for two hours at that point until I came across the pages I posted in my answer. I'll upvote yours now that I see it's basically the same thing. That said...I do like my formatting better ;-) – Doomd – 2019-12-16T10:11:21.423
This isn't working on my setup: Both host and guest are running Xubuntu 18.04, VirtualBox version is 6.1.2 r135662 (Qt5.9.5). I have installed the packages and the binary from the GuestAdditions CD image, rebooted, but no clipboard sharing. – FriendFX – 2020-02-11T02:18:55.130
1This solution worked for me (Win 10 host + Xubuntu 18) – Alex – 2019-04-03T09:54:50.970
1This 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 – 2019-05-09T08:39:35.597
2After I use aptitude to install virtualbox-guest-x11, it freezes my ubuntu 18.04 64bits. Now I need to reinstall ubuntu 18.04. – sam – 2019-05-13T07:56:31.440
For me
sudo apt-get install virtualbox-guest-x11-hwe
worked for my Ubuntu 18 guest running on a Windows 10 host. I found this by runningVBoxClient
at the terminal prompt, and getCommand VBoxClient not found, but can be installed with: sudo apt install virtualbox-guest-x11-hwe
– sez – 2019-12-05T22:37:02.377This worked for me. I had an older version of VirtualBox (5.2.6) and the latest Ubuntu 18.04 guest additions I had to install virtualbox-guest-x11 manually and also xorg-video-abi-23 and xserver-xorg-core. – Achraf JEDAY – 2020-02-04T16:27:24.870
This isn't working on my setup: Both host and guest are running Xubuntu 18.04, VirtualBox version is 6.1.2 r135662 (Qt5.9.5). I have installed the packages and the binary from the GuestAdditions CD image, rebooted, run
sudo VBoxClient --clipboard
but still no clipboard sharing. – FriendFX – 2020-02-11T02:19:13.757@sam Try to disable 3D acceleration – Hannes Schneidermayer – 2020-02-24T23:45:18.303
On Ubuntu 19 answer is working, on Ubuntu 18 it freezes everything. – Hannes Schneidermayer – 2020-02-25T19:54:49.297