Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

So I want to be redirected to my host system browser when I click some link in guest system.

Note that I don't want to have browser on guest system at all.

Host: Windows 7

Guest: GNU/Linux & KDE

Use case: I have 2 monitors, one is for Linux (Running in VirtualBox) but I want to have one browser for both so when I click on some link in Linux IRC client I want this link to be opened in running browser on host system.

share|improve this question
1  
What is your actual question as it seems very broad? –  Dave Sep 12 '12 at 8:29
    
Clarification: Are you saying, “When I am in Guest Gnu/Linux web-browser, and I click a specific link, then minimise the guest, maximise the host web-browser, and open the specific page”. Or “When I am in Guest Gnu/Linux web-browser, and I click a specific link, open a page hosted on the host.” Or how to I browse host files from guest, Or something else. –  richard Sep 12 '12 at 8:35
    
not in guest web browser, kde has got default browser app, I want to make it the host's browser. –  Heather Sep 12 '12 at 8:38
    
You are going to have to tell me what you want, I can't guess. So 1) KDE has an tool to set the default web-browser. is that correct? 2) You want the host to use the some browser, as set up in guest kde. is that correct? –  richard Sep 12 '12 at 8:45
    
1) Yes, KDE is major DE so settings -> default applications -> web browser 2) not, I want the links to be opened it host's web browser when I want to open some link from guest. –  Heather Sep 12 '12 at 8:53

2 Answers 2

up vote 4 down vote accepted

Another answer due to some clarifications below.

As you said, you can create a little script and set it as your default browser in your KDE settings. To make these things in the easiest way possible, you should simply send the firefox command to your host machine over SSH. Here's a link describing how to setup a SSH server on Windows 7, http://codeoptimism.com/2010/10/08/SSH-on-Windows-7-the-full-awesome-implementation

Then the script would be as simple as that (don't forget to allow execution) :

#!/bin/sh
ssh user@192.168.1.20 '/c/Program\ Files/Mozilla\ Firefox/firefox.exe $1'

Run this command before using it as your default web browser, as you would have to add the machine in your known hosts list. You will have to set up a public key authentication too, so it doesn't prompt the password.

KDE4 shoud let you specify the script's path to be run each time you click on a link.

share|improve this answer
    
What do you think maybe it could be possible using Virtualbox API? Adding yet another service (ssh) is a overhead ) –  Heather Sep 12 '12 at 9:24
    
I've just took a look on it, this API would be useful only on the hardware side, such as controlling mouse, keyboard, bios,... You can bind the events on the mouse with it, but it would only return the mouse's relative or absolute coordinates. –  Axel Isouard Sep 12 '12 at 9:25
    
I still doubt about it but maybe you are right and ssh is the only way of running something on host but that is sad, running ssh server on host machine is not really what I wanted but that is solution and fully feet the question. Maybe I will realize it some later, thank you. –  Heather Sep 12 '12 at 9:36

There aren't any popular solutions online for that, but I think you could try to create two plugins (with Greasemonkey, NPAPI or FireBreath), and it would be a little harder since your host machine is Windows 7 as I don't know any way to execute a command remotely like using SSH.

  • One for your host system, that listens to a port for incoming connections, and get the order to navigate through a link you will click in your guest system's web browser.

  • Another one for your guest system, which will connect to your listener and send a packet containing the link to go through.

If you feel alright with this solution and ready to start, I suggest you to ask StackOverflow if you need some help while doing it.

Good luck.

share|improve this answer
    
Virtualbox is not ssh... I need to hook when the link is coming to browser then redirect it to VirtualBox somehow - so there are 2 different sides of the question. Maybe I shell ask about it on Stackoverflow because it's about VBox API and scripting? –  Heather Sep 12 '12 at 8:44
    
You don't want to have a browser in your guest machine, would you like to click links appearing in terminals or other applications ? –  Axel Isouard Sep 12 '12 at 8:45
    
yes, for example in my IRC client application. –  Heather Sep 12 '12 at 8:46
    
Okay, it would completely depend from the IRC application, you will have to do the same thing as I said for every kind of application you would like to be redirected, I really don't know any way to detect a mouse click on a link in a generic manner. –  Axel Isouard Sep 12 '12 at 8:47
    
no need to detect a mouse click or make it for any application I want to replace default web browser application with some kind of script that will redirect me (somehow) to the host. –  Heather Sep 12 '12 at 8:55

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.