I am running VirtualBox 4.1.4 on my Windows 7 laptop, running an Ubuntu 11.10 guest.
I would like to copy text from Ubuntu's terminal and paste it into a file on the Windows host. This doesn't work for some reason.
Start your VM then install Virtualbox Guest Addition
You can find this option under "Devices" on virtual box 4.2 or you can follow the explanations at How do I install Guest Additions in a VirtualBox VM?
Go to VirtualMachine's Settings->General->Advanced->Shared Clipboard (Bidirectional)
Reboot your virtual machine.
for me it solved the problem (it was set on Disabled), I had some machines working some not, so i checked settings in working ones they had bidirectional clipboard. Dont know if this was upgrade issue or... just double check your shared clipboard options.
Hope this helps someone.
VirtualBox V 4.1.20
I had to do three steps:
sudo apt-get install virtualbox-guest-dkms virtualbox-guest-utils virtualbox-guest-x11
In VirtualBox 4.x:
Start the Ubuntu instance, then in the VirtualBox menu at the top of the running instance window, Machine > Settings..., Advanced tab, change Clipboard Sharing to Bidirectional. It's set to Disabled by default for some reason - not clear on why I'd ever want that.
I marked some text from firefox and tried to paste it into a terminal and it didn't work. I had guest additions installed, and also enabled bidirectional copy and paste and it still didn't work, but now I found the reason.
Apparently when I marked the text in firefox, additional information is also stored like the font and style. The terminal can not interpret this, so it doesn't seem to accept it. I pasted the text into a plain text editor (notepad++ in my case) then selected the text again and copied it. Now when I pasted it into the terminal it worked.
So this can also be a reason why copy&paste doesn't work, even if everything is correctly setup.
Using VirtualBox 4.3.12 with Ubuntu 14.04 x64 as the guest.