VectorLinux

Please login or register.

Login with username, password and session length
Advanced search  

News:

Visit our home page for VL info. For support and documentation, visit the Vector Linux Knowledge Center or search the Knowledge Center and this Forum using the search box above.

Author Topic: How to open thunderbird links in a new browser tab (not in a new window)  (Read 4204 times)

wcs

  • Packager
  • Vectorian
  • ****
  • Posts: 1144

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: [Select]
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: [Select]
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, 10:26:31 am by wcs »
Logged