SSH – Why Starting Firefox in VM Opens on Host Machine?

firefoxssh

I have a SLED 10 host machine and I am using a SLES 10 VM via ssh -X.

When I start firefox in my VM using firefox & then it runs the firefox which is installed in the VM. So that's fine.

However, if my host machine's firefox is running, and then I start VM's firefox, then instead of starting its own, a new session of host's firefox starts running.

Same happens the opposite way also, if VM's firefox is running then I am not able to start host's firefox.

Best Answer

Because for some reason, the firefox devs have decided that is a good idea. In fact, they are so sure this is a feature and not a bug, they have even provided an option to disable it. Try running

firefox -no-remote

That should cause a new instance to be started on the remote machine. For (a tiny bit of) more info, try firefox -h:

-no-remote         Do not accept or send remote commands; implies -new-instance.
-new-instance      Open new instance, not a new window in running instance.

This had me completely baffled for a while and I still don't understand why (or, for that matter, how) they do this.