=^.^=

Fix Remote Firefox over SSH with X11 Fowarding Runs Local Instance

You have logged into a remote host with X11 Forwarding enabled and at the command line you run firefox or thunderbird. To your surprise, a local version launches and loads your locally configured home page, extensions, etc. - or an already running instance opens a new tab. You close it, return to the remote host's command line, try again - the same thing happens! What in god's name is going on?

It turns out that the firefox command uses X11 inter-client communication and, assuming it is being used on a single machine, notices the already-running session you have open on your local machine and tries to work with that instead of launching a new session on its own host. You will notice if you terminate the locally running session (make sure firefox and any of its related processes have actually exited) and try again that the expected behaviour occurs: a new firefox session is started on the remote machine and forwarded to your local X server.

The remedy to this situation, if you intend to run a local and remote session at the same time, is to use the --no-remote flag on the command line.
{local} $ ssh [email protected] -Y {remote} $ firefox --no-remote

Why no-remote when running firefox remotely is exactly what we're trying to do? It turns out the nomenclature was established in the Netscape days to refer to the CLI command's ability to remotely issue commands to an already-running, separate, remote, if you will, instance:

For more details on this functionality and its history I direct you to the excellently written and well-researched Dissecting Firefox's -no-remote option article by Bryce Van Dyk.

Comments

There are no comments for this item.