WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

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

Offline qopit

  • Jr. Member
  • **
  • Posts: 81
Copy/paste to Micro Core as a Virtualbox guest?
« on: August 28, 2011, 08: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: 11178
Re: Copy/paste to Micro Core as a Virtualbox guest?
« Reply #1 on: August 28, 2011, 09:09:57 AM »
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, 09:59:20 AM »
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: 10957
Re: Copy/paste to Micro Core as a Virtualbox guest?
« Reply #3 on: August 28, 2011, 10:07:47 AM »
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, 10:51:21 AM »
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: 11178
Re: Copy/paste to Micro Core as a Virtualbox guest?
« Reply #5 on: August 28, 2011, 11:05:21 AM »
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, 11:23:55 AM »
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, 11:26:35 AM by SamK »

Offline maro

  • Hero Member
  • *****
  • Posts: 1228
Re: Copy/paste to Micro Core as a Virtualbox guest?
« Reply #7 on: August 28, 2011, 03: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, 12: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?)