VectorLinux
April 24, 2014, 12:03:01 pm *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Visit our home page for VL info. To search the old message board go to http://vectorlinux.com/forum1. The first VL forum is temporarily offline until we can find a host for it. Thanks for your patience.
 
Now powered by KnowledgeDex.
   Home   Help Search Login Register  
Please support VectorLinux!
Pages: [1]
  Print  
Author Topic: How to open thunderbird links in a new browser tab (not in a new window)  (Read 3201 times)
wcs
Packager
Vectorian
****
Posts: 1144


« on: March 11, 2009, 08:11:02 am »

I find it a bit annoying that clicking on several links inside an email (on Thunderbird) will open several Firefox windows, rather than open them in new tabs. And even if firefox is set to open everything in new tabs.

So far as I know, this also happens for other browsers, not just firefox.

The problem is that when you click on a link, thunderbird calls the /usr/bin/browser script, which then starts your  default browser, always in a new window, regardless of the browser preferences.

One solution is to change the following parameters in the Thunderbird config editor (Edit > Preferences > Advanced > Config Editor) to have the value "/usr/bin/firefox" (or another executable for a different browser), rather than "browser": network.protocol-handler.app.http and network.protocol-handler.app.https. Then the firefox preferences will apply.

The other solution, which I prefer because you might change your browser at some point, is to let Thunderbird call the browser script, but we have to change it a bit.

Go to /usr/bin/browser and change the 2 bits that say "new-window" to "new-tab".

Part of the original browser script:
Code:
case `basename "$PROG"` in
    seamonkey|*firefox|*firebird|*galeon|*mozilla|*konqueror)
       echo "Opening remotely ..."
       $PROG -remote openURL\("$1",new-window\) && exit
       echo "Opening directly ..."
       exec $PROG "$PAGE"
       ;;
    opera)
       echo "Opening remotely ..."
       $PROG -remote openURL\("$1",new-window\) && exit
       echo "Opening directly ..."
       exec $PROG "$PAGE"

Part of the NEW browser script:
Code:
case `basename "$PROG"` in
    seamonkey|*firefox|*firebird|*galeon|*mozilla|*konqueror)
       echo "Opening remotely ..."
       $PROG -remote openURL\("$1",new-tab\) && exit
       echo "Opening directly ..."
       exec $PROG "$PAGE"
       ;;
    opera)
       echo "Opening remotely ..."
       $PROG -remote openURL\("$1",new-tab\) && exit
       echo "Opening directly ..."
       exec $PROG "$PAGE"

I haven't tested it with Opera, but I assume it is the same.

Thank you!
« Last Edit: March 11, 2009, 09:26:31 am by wcs » Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!