How do I enable the shared clipboard in VirtualBox?

175

30

Where is the configuration option for sharing clipboards (copy & paste) between the host OS and the guest OS?

Greg Mattes

Posted 2009-09-16T14:32:43.837

Reputation: 2 744

Answers

193

With Guest Additions installed, the clipboard of your guest OS can be shared with your host OS.

Alt text

Highlight the Guest VBox in the VirtualBox console, open General -> Advanced. Here you can choose between various Shared Clipboard settings: Disabled, Guest to Host, Host to Guest or Bidirectional

Molly7244

Posted 2009-09-16T14:32:43.837

Reputation:

3Anyone know why it forces you to install Guest Additions on the guest even if all you want to do is copy ASCII from the host to the guest? Seems weird there wouldn't be a workaround for that case, since the VM is already forwarded keypress events. You'd just need to transparently inject host-to-guest keypress events. – Parthian Shot – 2014-08-15T15:31:02.687

1

@amphibient if you are using Ubuntu, then sudo apt-get install virtualbox-guest-dkms can help you (I took it here - http://askubuntu.com/a/578301)

– Dmitry Kotov – 2015-08-14T14:08:15.533

This link helped me https://www.smarthomebeginner.com/install-virtualbox-guest-additions-on-ubuntu-debian/

– Hitesh Sahu – 2018-10-26T09:25:24.263

Worked for me. The gcc error got thrown, but it worked. – Ini – 2018-12-05T22:45:00.253

3For anyone else who runs into this problem - I had option to enable Bidirectional clipboard with Windows8, before installing Guest Additions... but of course it wasn't working even though I selected the option. It started working normally after I went through process of installing Guest Additions. – nikib3ro – 2012-10-04T21:59:30.133

16A restart of the Guest OS was required for me after installing the Guest Additions and setting the Shared Clipboard to Bidirectional to work. – legends2k – 2012-10-05T02:02:41.230

How about unix like operating systems? for example: FreeBSD. – pylover – 2013-01-13T21:50:21.030

12I did Bidirectional, restarted the VM, but couldn't get it to work – amphibient – 2013-08-19T20:31:02.963

2this fixed all kinds of issues (resolution. clipboard, etc) – chovy – 2013-10-25T04:51:23.190

18

Windows 7 64-bit host, Ubuntu 12.10 64-bit guest.

I enabled clipboard and drag and drop before installing Guest Additions. After installing Guest additions clipboard and drag n drop did not work. I disabled clipboard and drag n drop, uninstalled guest additions, rebooted, reinstalled guest additions - still failed.

To fix I did this:

Uninstalled guest additions and disabled clipboard and drag and drop. Then from the terminal I used

$ apt-get install make gcc linux-headers-$(uname -r)

Reinstall (should be error free), reboot, enable clipboard and drag and drop. Voilà!

spryce

Posted 2009-09-16T14:32:43.837

Reputation: 379

Only solution which did the trick for me on Lubuntu. Many thanks! – Zar – 2014-09-19T17:44:30.897

Worked for me for Host Mac OSX -> Guest Ubuntu. – Vinay – 2016-02-04T20:43:02.900

Indeed, this is the solution that works for those who found this thread after already installing the guest additions and enabling the clipboard sharing. As a side note, you may also need to install dkms, and you don't need to reboot - just restart the window manager. – Valmiky Arquissandas – 2016-04-01T13:58:33.700

When you said uninstall guest additions, what guest additions do you install? Download from virtual box for the same version and run the script xxx.run, or install by using apt-get install virtualbox-xxx packages? Does that matter? – Robin Hsu – 2018-04-24T09:24:40.287

2This should be the answer! it worked for me. – Ketan – 2014-05-12T16:03:51.853

5

In VirtualBox Windows versions 5.1.8 until 5.2.6 (maybe older or future versions as well) it is accessible in two ways:

  1. General settings
  2. Active guest account window

If someone knows what other versions work as well, please add them as comments.

1st Version: General settings

Machine>Settings:

Machine>Settings

General>Advanced>Shared Clipboard

General>Advanced

2nd Version: Active guest account window

Devices>Shared Clipboard>Desired option Bidirectional Clipboard selected Available options: 1. Shared Clipboard>Disabled 2. Shared Clipboard>Host to Guest 3. Shared Clipboard>Guest to Host 4. Shared Clipboard>Bidirectional

strpeter

Posted 2009-09-16T14:32:43.837

Reputation: 165

4

Install Guest Additions for Windows XP. That will allow you to integrate the guest operating system with the host.

Some features:

  • Shared Folders - Meaning you can create folders that are accessible by both the guest and host systems.
  • Accelerated Video
  • Mouse Integration - You no longer need to capture the mouse. Focus follow your mouse.
  • Shared Clipboard

To install the Guest Additions, refer to the User Manual, Chapter 4.

A Dwarf

Posted 2009-09-16T14:32:43.837

Reputation: 17 756

2

I had the same problem with clipboard not working on my host windows 10 , and ubuntu 16.06 guest. I tried all of the above to no avail. Finally, from the virtual box website I tried this command

If you suspect that something has gone wrong, check that your guest is set up correctly and try executing the command

sudo rcvboxadd setup

https://www.virtualbox.org/manual/ch04.html#idm1948

Then after a reboot of the guest machine shared clipboard copy and paste finally worked correctly

salza80

Posted 2009-09-16T14:32:43.837

Reputation: 21

Ubuntu 16.06 sounds interesting – PulseJet – 2017-02-01T12:47:46.977

Worked for me using VirtualBox on macOS 10.14.2 using Ubuntu 18.04, may ask to install gcc make perl, do that and restart. – David – 2019-01-19T15:08:07.157

2

At the Virtual Box base windows , just go to settings of your machine and in General you can change the settings.

enter image description here

Tzvi Gregory Kaidanov

Posted 2009-09-16T14:32:43.837

Reputation: 149

2

In order to share your Host clipboard you will need the Guest Additions installed first.

As for the options for the clipboard, Right click the Guest VM within Virtual Box, Select Settings, In the General section select the Advanced tab.

lyarwood

Posted 2009-09-16T14:32:43.837

Reputation: 1 804