Opening URLs in Moz Firefox

Does anyone else have problems sending commands to a running instance of Mozilla Firefox?
I want Thunderbird to open links in new Firefox tabs but the following command fails:

$ mozilla -remote "openurl(, new-tab)"
Failed to send command.

If I don’t include a URL then a dialog pops up asking for one but that’s hardly what I want to happen. Google hasn’t been too helpful, but maybe someone reading this has come across this already!

By Donncha

Donncha Ó Caoimh is a software developer at Automattic and WordPress plugin developer. He posts photos at In Photos and can also be found on Twitter.

1 reply on “Opening URLs in Moz Firefox”

This script seems to work nicely for me.

export MOZILLA_FIVE_HOME="/usr/lib/MozillaFirefox/"

if [ "x$url" = "x" ]; then

if $MOZILLA_FIVE_HOME/mozilla-xremote-client openURL\("$url",new-tab\); then
exit 0
exec $MOZILLA_FIVE_HOME/firefox "$url"

The only problem I have is that it opens a locally cached copy (file:// instead of the actual URL. This is annoying because any links that aren’t absolutely linked don’t work. I’m still searching for an answer to that one.

Leave a Reply