Skip to content

Getting a remote instance of Firefox running with a local instance

I needed to access some web-based interface on a machine that was accessible only through an isolated network. Luckily, X11 display forwarding makes this a trivial job. However, Firefox isn’t giving me any love. Normally, you would try to do something below to start a X11 forwarded session via ssh between a machine named client1 and a machine named server1

client1$ ssh -X server1
server1$ firefox

What this does is that it ends up trying to open a new window / tab on client1 rather than on server1 and forwarding its display back home. After gnashing my teeth on this, I found the answer at this URL. THe key magic is you need to set the MOZ_NO_REMOTE value to 1 (Oh yeah, I love these features) so that it prevents Firefox from trying to query the local machine for any Firefox instances. So to fix the above example try this (assuming bourne shell syntax):

client$ ssh -X server1
server1$ export MOZ_NO_REMOTE=1
server1$ firefox

You might have to try giving the -P option to fire up a different profile in Firefox as well but what I show above worked for me.

Be Sociable, Share!