Thursday, March 15, 2012

Copy Paste shit in Virtualbox

VirtualBox host =Windows 7
VirtualBox Guest = Fedora 14 with OpenBox and Eterm
Basically, no selection you make in Eterm can be copied with Ctrl-Ins the expected way into Windows.
Copy Paste Hell Between Windows Host and Linux Guest in VirtualBox gave me part of the solution:
Install xsel with:
> sudo yum -y install xsel
And use the following command to capture selection in Eterm:
> xsel | xsel -b
The problem is now to bind it to a key, let's say Ctrl-Ins ;), in OpenBox.
In ~/.config/openbox/rc.xml, add the following:
1
2
3
4
5
6
7
8
9
<keybind key="C-Insert">
  <action name="Execute">
    <startupnotify>
      <enabled>true</enabled>
      <name>xsel</name>
    </startupnotify>
    <command>sh -c '/usr/bin/xsel | /usr/bin/xsel -b'</command>
  </action>
</keybind>
Do not forget the sh -c or it won't work.