default browser and default mail application

Ken Moffat kmoffat at drizzle.com
Thu Mar 11 14:59:06 CET 2004


Rakotomandimby Mihamina wrote:

>  
>
> The same way , i woul like Thunderbird to launch a new tab of Firefox 
> when i click on an http link included in a mail message ...



I know there are easier ways, but here is something I experimented with:


What I did was:
edit the default libranet ~/.xsession:

#!/bin/sh

if [ -e /usr/bin/firefox ] ; then
        export BROWSER="/usr/bin/firefox"
fi

xhost +localhost
exec icewm-experimental || exec xterm

Then edited .bashrc, adding the same to the end:

if [ -e /usr/bin/firefox ] ; then
        export BROWSER=/usr/bin/firefox
fi

(You probably don't need both, but which is the question... Or maybe 
neither, since I went to the debs instead of the tarballs! Sorry about 
this.)

Now firebird is opened from thunderbird using a new window.

I had an addition to "/usr/bin/sensible-browser" that opened a new tab 
but during a recent system upgrade it was overwritten ;-( but here is 
something close you could try:


if (exists $ENV{BROWSER}) {
    if ($ENV{BROWSER} == "/usr/bin/firefox") {
        if (`ps -A | grep firefox-bin`) {
            system  `$ENV{BROWSER} -remote 'openURL($url, new-tab)'` ;
        }
        else {
            system  `$ENV{BROWSER} $url` ;
        }
    }
}

I added this right after my "$url=shift;" near the top of 
/usr/bin/sensible-browser.

-- 
Ken






More information about the Xfce mailing list