You need a script to start Firefox from external progs.
Code:
#!/bin/sh
URL="$*"
FFOX=/usr/local/firefox/firefox
FFOX_REMOTE="${FFOX} -a firefox -remote"
firefox_running()
{
$FFOX_REMOTE "openurl($URL,new-tab)"
}
firefox_new()
{
$FFOX $URL
}
if $FFOX_REMOTE "ping()" 2>&1 | grep "Error:" >/dev/null; then
firefox_new;
else
firefox_running;
fi
Put it in subdirectory of your /home and call it start-firefox.sh, i think it's enough.