Running Firefox remotely over ssh
Oct 11, 2011 in Howto, Remote administration
I’m connected to a remote machine over ssh (‘ssh -X remotemachine’).
I try to launch Firefox
user@linux-iek6:~> firefox
It launches, yes, but locally! Quite surprising to me.
OK, so I stop it and do some google searching…
Then, to make it run on the remote machine I command:
user@linux-iek6:~> firefox -no-remote
GConf-WARNING **: Client failed to connect to the D-BUS daemon:
Using X11 for dbus-daemon autolaunch was disabled at compile time, set your DBUS_SESSION_BUS_ADDRESS instead
GConf Error: No D-BUS daemon running
OK, it runs remotely now, but I stop it again and do some google search again.
Then, to get rid of that problem I first command: export $(dbus-launch)
user@linux-iek6:~> export $(dbus-launch)
and then:
user@linux-iek6:~>firefox -no-remote
*** nss-shared-helper: Shared database disabled (set NSS_USE_SHARED_DB to enable).
Some google again…
To get rid of also that I command:
user@linux-iek6:~>export NSS_USE_SHARED_DB=ENABLED
and then:
user@linux-iek6:~>firefox -no-remote
and now it runs on the remote machine without errors!
So I put all those in a script:
#!/bin/bash
export $(dbus-launch)
export NSS_USE_SHARED_DB=ENABLED
firefox -no-remote &
That tiny thing does all the above nicely.
If you like to see what it’s doing add -x to the first line:
#!/bin/bash -x



