Linux – Launching firefox on remote server causes local firefox to open the page instead

firefoxlinuxssh

Right, this is strange. I am connecting from my laptop (LMDE) to a remote host (SUSE Linux enterprise) using ssh -X. I want to launch a Firefox instance running on the remote server so I can have access to webpages on a private network.

User@RemoteMachine $ which -a firefox
/usr/bin/firefox
User@RemoteMachine $ /usr/bin/firefox --version
Mozilla Firefox 2.0.0.2, Copyright (c) 1998 - 2007 mozilla.org


User@LocalMachine $ which -a firefox
/usr/bin/firefox
User@LocalMachine $ /usr/bin/firefox --version
Mozilla Firefox 14.0.1

Now, if Firefox is not running on the local machine, everything goes as expected and executing firefox on the remote machine causes a Firefox (v 2. 0) window running on the remote machine to show up. However, if Firefox is running on the local machine a second window of Firefox 14. 0. 1 running on the local machine appears.

I have checked top in both machines. In the 2nd case, a Firefox process briefely appears on the remote machine and then disappears when the local version of Firefox is launched.

My questions are the following:

  1. What gives? How/why can Firefox connect to its existing instance on the local machine? The remote machine appears to have access to the local machine. It, in fact, appears to have the right to execute programs on my local machine. Am I missing something or is this just weird?

  2. Is this not a security risk?

Best Answer

By default, Firefox will talk to the existing Firefox process and reuse it.

If you wish to override this behavior and start a new process, add the -no-remote command line option when starting the second Firefox process:

firefox -no-remote
Related Question