Open html file in Firefox

Can I open html file gracefully in httpMozilla Firefox? Even in new tabs everytime?

Sure. One way is to put the script below into (for example) ~/bin. Name it 'Firefox' or something and make it executable. Check if that /opt install path applies to your system.



if [ -x "$FIREFOX" ]; then
      "$FIREFOX" "$1" || "$FIREFOX" -remote "OpenURL($1, new-tab)"

Then right click on some HTML file in ROX-Filer and choose Set Run Action. Drag the `Firefox' script you created into the box, and you're set.

Here's another firefox script, make sure to change FIREFOXDIR to the right directory:


REMOTE="$FIREFOXDIR/mozilla-xremote-client -a firefox"
if ( $REMOTE "ping()" 2>/dev/null); then
        exec $REMOTE "openurl($1,new-tab)"
        exec firefox "$1"