Hi all.
When running Mozilla Firefox (as I do), some might discover that trying to run another instance of it (for example, for your favorite mail client) will pop-up the "profile selection" window.
After some googling, I came up with a script, attached here.
It is based on the assumption firefox resides in /usr/lib/firefox and that you're going to call the script right from the start to run firefox.
It will open new links (from outside source) using new tab (and not new window. I don't like new windows).


On my system, this script is located in /usr/bin

Of course, no responsibility on my behalf.

Have fun.

Ez.

#!/bin/bash

FIREFOXPATH=/usr/lib/firefox/
FIREFOXNAME=firefox
URL=${1}

FIREFOX="$FIREFOXPATH$FIREFOXNAME"
if [ -x $FIREFOX ]; then
        $FIREFOX -a firefox -remote "ping()" &> /dev/null
        if [[ "$?" == "2" ]]; then
                $FIREFOX -a firefox $URL &
        else
                $FIREFOX -a firefox -remote "OpenURL($URL,new-tab)" & 
        fi
fi

Reply via email to