[vbox-dev] Switching from the host to the fullscreen virtual machines using hotkeys
agr at amigrave.com
Wed Feb 4 13:16:36 PST 2009
I'd like to achieve this goal with virtual box :
Having virtual box on a windows or linux host, and then being able to
assign a hotkey that would allow me to switch from the host to any
full screened virtual machine running.
Also, from the full screen virtual machine, I'd like to have a hotkey
to switch back to the host.
I asked the user list if it was possible right now but it seems not really :
I was thinking about this and I had an idea of a feature in virtual
box that would allow to achieve such a goal and much much more.
The basic idea would be to allow scripting/programming vbox on the
host and also from the guests (via guest additions)
We would need a host api and a guest api.
On windows host, it would be possible to make a program in C, C++, C#,
python, ... via a vbox dll or also an activex object so it's also
possible to script it using cscript or whatever.
Maybe this api could be implemented via VBoxManage ? dunno.
For posix hosts, it would be basically the same, an .so that could be
linked when programming in compiled languages or binded for use with
any scripting languages.
So here's an example of code bound to a hotkey on the host:
<pseudo py code>
import vbox, gui
selected_vm = gui.display_choice( vbox.get_running_vms() )
vbox.focus_vm( selected_vm )
</pseudo py code>
On the guests, the principle would be the same except that the "guest
api" would be provided by the guest additions.
Example of a jscript running with cscript bound to Win+Tab
var vbox = new ActiveXObject("Sun.VirtualBox");
I was talking here about trivial examples such as hotkeys
customization stuff, but of course a feature like that would allow to
achieve much more interesting goals !
It would bring advanced communication between host and guests and the
possibilities are only limited to the implemented apis. (ex: vbox
I guess there might be a security problem because basically, any
malware on the guest could compromise the host and vice versa. But a
sort of "signed" handshake when initiating the api could resolve this
Please, tell me if this idea is crazy and if I should be banned from
vbox mailing lists for life.
Also, if such a feature already exists then I'll feel stupid but also
happy to learn about it ;-)
PS: my english is very bad, this mail is for sure very unpleasant to
read. I'm very sorry about that.
Email: agr at amigrave.com
IM: amigrave at gmail.com
More information about the vbox-dev