Friday, February 22, 2013

Running Firefox remotely via SSH with X forwarding

We all love the neat trick of running X applications remotely:
$ ssh -XC$ xeyes

Today I tried to do the same with Firefox to debug an issue where people from outside our office were getting "403 Forbidden" on one of our webservers. I ssh'ed to the remote machine so I could try to reproduce the problem. But I couldn't reproduce it. Looking in the Apache logs, I saw that the connections I was initiating were originating from my local machine, not the remote host.

After "staring into the abyss" for a long time, a colleague of mine suggested closing all my local Firefox windows. Suddenly it started to work. The reason is that the remote Firefox instance detected the local instance and decided to save network bandwidth by opening a window locally, instead of remotely as I was expecting.

Turns out this behavior can be disabled by running Firefox with the -no-remote option:$ firefox -no-remote

There's a discussion of this issue at

No comments:

Post a Comment