WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Copy/paste to Micro Core as a Virtualbox guest?  (Read 6746 times)

Offline qopit

  • Jr. Member
  • **
  • Posts: 81
Copy/paste to Micro Core as a Virtualbox guest?
« on: August 28, 2011, 11:59:42 AM »
Does anyone know of a way to be able to copy-paste from the host machine to a Micro Core guest?  I've got a standard set of things to do (like adding CFLAGS, CXXFLAGS, etc) and would reeeeeally like to be able to just paste them into the machine, rather than typing them all the time.

I tried installing the virtualbox additions, but it did not work (nor did I really expect it to).

The host is VirtualBox 4.0.12 running on Ubuntu.


Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11594
Re: Copy/paste to Micro Core as a Virtualbox guest?
« Reply #1 on: August 28, 2011, 12:09:57 PM »
Hi qopit
Try this:
Highlight the text you want to copy by holding down the left mouse button and dragging the mouse.
Then go to the destination window, left click to give it focus, then click the middle mouse button.


Offline qopit

  • Jr. Member
  • **
  • Posts: 81
Re: Copy/paste to Micro Core as a Virtualbox guest?
« Reply #2 on: August 28, 2011, 12:59:20 PM »
Highlight the text you want to copy by holding down the left mouse button and dragging the mouse.
Then go to the destination window, left click to give it focus, then click the middle mouse button.

Thanks for the suggestion, but that does not work.  When the guest window gets focus, mouse events are totally lost.

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11044
Re: Copy/paste to Micro Core as a Virtualbox guest?
« Reply #3 on: August 28, 2011, 01:07:47 PM »
You always have networking ;)

nc -l -p 1234 > /tmp/text # on the guest

nc ip.of.guest 1234 << "EOF" # on the host
CFLAGS=""
...
EOF
# press ctrl-c
The only barriers that can stop you are the ones you create yourself.

Offline qopit

  • Jr. Member
  • **
  • Posts: 81
Re: Copy/paste to Micro Core as a Virtualbox guest?
« Reply #4 on: August 28, 2011, 01:51:21 PM »
Yeah - I wondered if I would have to resort to copying a script over the network.  Thanks for the nc suggestion.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11594
Re: Copy/paste to Micro Core as a Virtualbox guest?
« Reply #5 on: August 28, 2011, 02:05:21 PM »
Hi qopit
Or maybe the paste buffer isn't shared with the guest window.

Offline SamK

  • Hero Member
  • *****
  • Posts: 713
Re: Copy/paste to Micro Core as a Virtualbox guest?
« Reply #6 on: August 28, 2011, 02:23:55 PM »
Does anyone know of a way to be able to copy-paste from the host machine to a Micro Core guest?
Autocutsel might be used for this. 
http://www.nongnu.org/autocutsel/
It synchronizes the buffers of the remote and local machines allowing copy and paste of text in the usual way.  Its not currently in the TC repos so you will probably have to make an extension of it, or request one to be submitted.
   
« Last Edit: August 28, 2011, 02:26:35 PM by SamK »

Offline maro

  • Hero Member
  • *****
  • Posts: 1228
Re: Copy/paste to Micro Core as a Virtualbox guest?
« Reply #7 on: August 28, 2011, 06:33:24 PM »
I guess as a user of MC (which some responses here seemed to have overlooked) the OP asks for something like "gpm for VBox", and I'm not aware that such a thing exists. Clearly the VBox GA and also 'autocutsel' are operating on top of a running X server, so they are not helping here.

Apart for the method via 'nc' which has already been pointed out (and which I personally use dozen of times each day to share information between VMs and the host as it does not require any other piece of software) I would suggest to look into running a SSH server in the VM. Connecting to it from the host is simple enough and as the "terminal" is then a host application any clipboard method that works on the host should also work for the guest session.

Offline SamK

  • Hero Member
  • *****
  • Posts: 713
Re: Copy/paste to Micro Core as a Virtualbox guest?
« Reply #8 on: August 29, 2011, 03:04:20 AM »
...the VBox GA and also 'autocutsel' are operating on top of a running X server, so they are not helping here.
I will retreat back into my shell (or should that be GUI?)