Ssh – Starting firefox on a remote host (over ssh) opens a new window locally: what is happening

firefoxremotessh

I have never noticed this behaviour before, and am a little confused as to what is happening. I have a local copy of firefox running, then ssh (ssh -X <url>) into a remote server and start a copy there to use the local display. Turns out the local firefox just opened a new window. I verified with ps x|grep firefox that indeed no firefox process is started on the remote server.

This same strange behaviour happens in reverse: if I have a remote firefox running and try to start a local one, then the remote one opens a new window.

I am on ubuntu 10.4, with a nearly completely fresh install (I just got this computer this afternoon). I was trying to have the two firefoxes running at the same time so that I could easily run down the list of plugins to install.

What is happening here, and how can I avoid it from happening?

Best Answer

If I had to make an educated guess about what's going on here, I'd say that firefox first looks for an open firefox window before launching, and if that exists sends it a message using X to just start a new browser window. Because the remote system is using your local display, whatever it uses for detection is picking up the local window. (This would also explain why the remote window is found when you're starting a local firefox process.)

You can test this by closing all local firefox windows, and then trying to start firefox on the remote server - if the detection is happening like I think it is, there won't be any running windows for it to latch on to, so it'll start an instance on the remote system like you expect.

As far as actually fixing the issue, tante's suggestion to set MOZ_NO_REMOTE is the proper solution.

Related Question