I have Windows 7 and use VirtualBox. I have installed Ubuntu Server as a Guest.

Is there any easy way where I can copy text in the Ubuntu Server terminal to my Windows 7 host? And also doing the same in the other direction?

link|improve this question

Do you have Guest Additions installed? If so, it should Just Work. – Dennis Williamson Oct 25 '10 at 20:30
@Dennis: No, where can I get it? – Jonas Oct 25 '10 at 20:34
It's on the ISO that contains Virtualbox. When you select install Guest Additions in the VB menu that mounts an image in your guest as a CD/DVD. From Ubuntu, navigate to that directory (/media/something probably) and run the appropriate shell script (you should be able to tell which one based on their names). – Dennis Williamson Oct 25 '10 at 20:38
@Dennis: /media/cdrom/ is empty for me, and cdrom/ is the only directory I have in /media – Jonas Oct 25 '10 at 20:42
@Dennis: But when I look in the CD-Rom menu in VirtualBox the VBoxGuestAdditions.iso is checked. – Jonas Oct 25 '10 at 20:45
show 5 more comments
feedback

4 Answers

up vote 4 down vote accepted

I think the best solution is to "ssh" into the server and work on it like that.

The best known SSH client & terminal emulator on Windows is probably PuTTY. When you use that, it will allow you to copy/paste text from/to it.

link|improve this answer
This seems to be the way to go. I now followed the instructions on Installing Guest Additions in VirtualBox for an Ubuntu Server Guest. However, as stated in the end of that article. It won't give me support for copy-and-paste unless I install X.Org or XFree86 Window System. – Jonas Oct 25 '10 at 22:02
feedback

I believe you need to install the Virtualbox Guest Additions. This adds certain integration features like the ability to share the clipboard between the host and guest.

After installing guest additions you see the options for clipboard settings such as "Host to Guest", "Guest to Host", as well as "Bidirectional" clipboard sharing. The last is my preference.

link|improve this answer
How do I install the Guest Addition? I have tried from the menu, but nothing happens. – Jonas Oct 25 '10 at 20:32
There is no "clipboard" in an Ubuntu Server though (it doesn't have a GUI, at least not in a default install). – JanC Oct 25 '10 at 21:26
1  
@JanC Didn't see the "server" part at first glance. In this case, SSH into the server is a good solution. If he has any sort of GUI environment, even just X, guest additions should work however. – John T Oct 25 '10 at 21:59
feedback

I had to run manually the following command after installation of Virtualbox Guest Additions to make copy & paste work.

sudo VBoxClient --clipboard

link|improve this answer
I had the same problem, and I find that I have to run the above command before every time I want to copy/paste (i.e., one copy operation on the host is all the command gives you). – Edan Maor Apr 6 '11 at 17:49
feedback

Yes. Highlight the text and right-click. Choose "Copy". Go to the other application and right-click, then choose "Paste". At least that works with my own Ubuntu host and Windows XP guest, in either direction.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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