Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sometimes while using VirtualBox, I have tried copying text from the virtual machine to the host machine but failed. Whenever that happens, I fix it by rebooting the virtual machine. Is there a solution to this because I don't want to keep rebooting again and again.

Note: Iit is always possible for me to copy text from the host to the virtual machine.

share|improve this question
    
Have you tried just re-installing the Guest Additions in the Virtual Machine? If not, check the answer from Pisu below. You didn't mention how you originally installed VirtualBox (external package from VirtualBox's website, or the virtualbox-ose package from the Ubuntu repositories) Also, what version you are on (both Ubuntu and VirtualBox). This info may help us help you. –  Jayson Rowe Sep 30 '11 at 1:58

12 Answers 12

If your guest OS is ubuntu then running following two commands in ubuntu terminal should help:

$ killall VBoxClient
$ VBoxClient-all
share|improve this answer
    
+1 as I too had this happen right after taking a snapshot of an Ubuntu 12 installation. These two lines did the trick for me! –  HostileFork Mar 7 '13 at 5:18
    
+1, this worked for me on Ubuntu 13.04 –  Moshe Jul 4 '13 at 23:36
1  
+1 ,This worked for Ubuntu 12.04 but I used $ killall VBoxService –  Ahmed Feb 24 '14 at 0:35
1  
VBoxClient wasn't running on my Ubuntu. VBoxClient-all started the tools correctly and fixed host-to-guest pasting (but not the other way). Notice VBoxClient-all is the binary name and not a flag! –  Air May 22 '14 at 15:18
    
+1, it works on RHEL guest machines as well. –  sand Jan 5 at 9:15
up vote 11 down vote accepted

I found that I can do one thing to fix this problem.

That is, In virtualbox XP, I can kill VBoxTray.exe and restart it by task manager(ctrl+alt+del).

Thank you for answering my question.

share|improve this answer
    
Unbelievable, it works great though :) Also on my Windows 2008R2 x64 virtual OS. Thanks for sharing! –  Koen Zomers Apr 6 '12 at 14:00
    
Thank you! Works for Windows 7 x64, VirtualBox 4.3.16.0. –  Sergey Brunov Oct 6 '14 at 20:59
    
To restart: Browse to the VirtualBox Guest Additions installation folder and select VBoxTray.exe and select OK. –  Meysam Apr 5 at 10:54

In the Oracle virtual box setting go to

Settings > General > Advance

There is a an option Drag n Drop. Select the direction you want to copy the text.

share|improve this answer
    
Thanks, that helped. I would have had to search for a long time to find that one. –  WitchCraft Apr 23 '14 at 20:11

If needed, upgrade VirtualBox to latest version, currently 4.1.2, they solved many issues. Then reinstall Guest Additions on the VM, as copy-paste is managed by guest additions drivers.

share|improve this answer

How to fix shared clipboard in VirtualBox (Windows Guest)

  1. In VirtualBox Windows Guest, Open Task Manager
  2. Go to Processes Tab, highlight VBoxTray.exe and select End Process
  3. Go to Applications Tab and select New Task
  4. Browse to the VirtualBox Guest Additions installation folder and select VBoxTray.exe and select OK.

The bidirectional shared clipboard should work afterwards.

share|improve this answer

The problem is that the VBoxClient for the clipboard has been killed.

Dmitry's solution above fixes it

muz@kratos:~/$ ps -ef | grep -i vbox
root       928     1  0 Jan31 ?        00:06:02 /usr/sbin/VBoxService
muz       1441     1  0 Jan31 ?        00:00:00 /usr/bin/VBoxClient --display
muz       1445     1  0 Jan31 ?        00:00:00 /usr/bin/VBoxClient --seamless
muz       1450     1  0 Jan31 ?        00:38:19 /usr/bin/VBoxClient --draganddrop
muz      10215  2769  0 10:04 pts/1    00:00:00 grep --color=auto -i vbox
muz@kratos:~/$ killall -9 /usr/bin/VBoxClient
muz@kratos:~/$ VBoxClient-all
muz@kratos:~/$ ps -ef | grep -i vbox
root       928     1  0 Jan31 ?        00:06:02 /usr/sbin/VBoxService
muz      10256     1  0 10:04 ?        00:00:00 /usr/bin/VBoxClient --clipboard
muz      10260     1  0 10:04 ?        00:00:00 /usr/bin/VBoxClient --checkhostversion
muz      10264     1  0 10:04 ?        00:00:00 /usr/bin/VBoxClient --display
muz      10268     1  0 10:04 ?        00:00:00 /usr/bin/VBoxClient --seamless
muz      10272     1  0 10:04 ?        00:00:00 /usr/bin/VBoxClient --draganddrop
muz      10280  2769  0 10:05 pts/1    00:00:00 grep --color=auto -i vbox
share|improve this answer

Restart the VBox clipboard module:

pkill 'VBoxClient --clipboard' -f & sleep 1 && VBoxClient --clipboard

share|improve this answer
    
Thanks. I was having a problem pasting from guest to host (but not from host to guest) and this solved it for me. –  Jamil Jun 15 at 14:52

In Ubuntu you may need to install virtualbox-guest-x11

sudo apt-get install virtualbox-guest-x11

and then start virutal box client

VBoxClient-all
share|improve this answer

There are only 2 ways:

  1. Create a shared folder between the VM and the Host machine.
  2. Create a host only network so as you can use SSH or Telnet to exchange files between the host and virtual machine
share|improve this answer

My configuration is Windows host, Xubuntu guest. I guess it doesn't hurt to restart everything, but this is the client that matters. (VBoxClient-all is merely a script that runs /usr/bin/VBoxClient --clipboard and others.)

$ ps -fe|grep -i clip
tbc       1400     1  0 Jan18 ?        00:00:00 /usr/bin/VBoxClient --clipboard
$
$ p=1400;kill -int $p;ps -fp $p
$ /usr/bin/VBoxClient --clipboard
$ ps -fe|grep -i clip
tbc      30555  1281  0 13:01 ?        00:00:00 /usr/bin/VBoxClient --clipboard
$ pstree -sp 30555
init(1)---lightdm(1094)---lightdm(1261)---init(1281)---VBoxClient(30555)---{VBoxClient}(30556)
$

Note it runs in the background by default. It was owned by init(1), but when I invoked it, it got adopted through a tree I'm not familiar with.

share|improve this answer

I use a Mac Host OS, and Ubuntu Guest (with lubuntu desktop).

Dmitry's answer got me so close! But VBoxClient wasn't running when I looked for it with ps, and trying VBoxClient-all failed:

$ VBoxClient-all
Failed to connect to the VirtualBox kernel service
Failed to connect to the VirtualBox kernel service
Failed to connect to the VirtualBox kernel service
Failed to connect to the VirtualBox kernel service
Failed to connect to the VirtualBox kernel service

Then I found https://www.virtualbox.org/ticket/9332

Turns out, VirtualBox additions didn't launch automatically for some reason. Starting vboxadd manually allowed me to then run the VBoxClient with the clipboard enabled.

arin@arin-VirtualBox:~$ sudo /etc/init.d/vboxadd start
Starting the VirtualBox Guest Additions ...done.
arin@arin-VirtualBox:~$ ps -ef | grep -i vbox
arin      2687 22537  0 10:53 pts/1    00:00:00 grep --color=auto -i vbox
arin@arin-VirtualBox:~$ sudo /usr/bin/VBoxClient --clipboard
arin@arin-VirtualBox:~$ ps -ef | grep -i VBox
root      2693 22100  0 10:53 ?        00:00:00 /usr/bin/VBoxClient --clipboard
arin      2698 22537  0 10:53 pts/1    00:00:00 grep --color=auto -i VBox

And now copy/paste works!

share|improve this answer

I was using VirtualBox 4.3.12. Once I upgraded to 5.0 the latest, the bugs were fixed.

No combination of reinstalling Vbox additions helped.

Solution: always try upgrading to the latest https://www.virtualbox.org/wiki/Downloads

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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