[CentOS] Running firefox on a remote host on centos-4

Mon Aug 14 22:45:36 UTC 2006
Erik Laxdal <elaxdal at ECE.UVic.CA>

Joshua Baker-LePain wrote:
> Back in the day (read: before the latest firefox update), I used to be
> able to ssh to a remote box, run 'firefox -local', and have that box fire
> up its own firefox session even if I was running firefox on the system
> from I which I sshed.  Those days seem to be gone.  No matter what I 
> try, if I've got firefox running on my local desktop, the remote firefox 
> command just fires off another instance of the local firefox session.
> 
> I've got several boxes running monitoring daemons reporting via http 
> only to the localhost, so this was a handy feature for me.  Is there any 
> official way to get it back?  If not, I guess I'll have to hack a 
> 'localfirefox' script that doesn't do the nasty mozilla-xremote-client 
> trick.
> 
> Ah, progress... *sigh*
> 

As an alternative solution, why don't you take advantage of ssh's port 
forwarding ability and use just your local copy of firefox to access the 
web server as if you were local to the box.  When you connect to the 
remote box, use something like:

      ssh -L 8080:localhost:80 remotebox

Then on your local box's copy of firefox point the url to:

      http://localhost:8080/

This should (assuming the network is slower than gigabit) provide you 
with the fastest firefox response and use less resources on the remote 
systems.  There are other possible benefits such as, with multiple ssh 
sessions and different port redirects (8081, 8082, ...) you could 
monitor daemons (different boxes) from different tabs in a single 
firefox window.

The one caveat with this is if you are using virtual hosts on the web 
server, further tweaks to the local hosts file and the local firefox url 
will be required.

Erik