I had the same idea as Ignacio Vazquez-Abrams and I implemented it.
So the first part of this is an HTTP server that listens to requests on the machine where you want to open the browser. On an incoming request it opens (in a browser) the URL given as an argument of a POST request.
Pick one:
You should add this script to startup, it's supposed to run in the background.
The second part is something that invokes the request.
Pick one:
You should designate this script as your default browser. How to do that is... a separate question. You can search for something like "windows set custom executable as default browser".
It can also be used as a command line tool: ./open_url.py 'http://google.com/'
The Python scripts should work on all major systems with any reasonably recent Python version (I suspect 2.6+, 3.1+).
On Windows, if you don't want a Python script to run in a command window, you should change its extension to .pyw
. Use Task Manager if you want to stop it (look for pythonw.exe).
VirtualBox network adapter should be set to NAT (default setting). More about the IP address here. The choice of port is arbitrary, feel free to change 1337 to something else everywhere.
The server is secure because it listens only to connections from localhost. VirtualBox makes it work somehow. But if you want this to work remotely, specify the listening IP address as '0.0.0.0'
or ''
instead of 'localhost'
.
1No, dont really think so. (Security is one point in using a VM, and this would totally ruin that point I guess if a VM can manipulate the OS this easily. VirtualBox is one hell of a software, but still does at least this much.) – Apache – 2010-05-12T08:11:38.423
I figured it was a long shot, was hoping someone had a dirty hack to make this work.... guess not. :-) – ThatGraemeGuy – 2010-05-12T08:25:54.563
I don't agree it would have to be a security hole. I filed a bug to add a URL handler to Guest Additions. If you are trying to host Malware in a VM, then you wouldn't install Guest Additions to begin with (it gives access to video, etc.).
– docwhat – 2011-06-06T14:36:35.687