Make Firefox open URLs passed from external applications in new tabs

From MozillaZine Knowledge Base
Jump to navigationJump to search

In Firefox 1.5 and trunk and branch nightlies leading up to 1.5, "Tools -> Options (Edit -> Preferences on Linux) Tabs -> Open links from other applications in" provides the ability to choose whether URLs passed from an external application should be opened in a new window, a new tab, or in the current tab or window. However, if that does not work or you are using an older version of Firefox, the tips below may help.

Linux

The following tip may not work in all Firefox versions, depending on how recent the version is.

  • Edit the "firefox" startup script in the Firefox base directory, usually located at some place like "/usr/bin/firefox/firefox".
  • Search for a line containing "openURL".
  • Replace _remote_cmd="openURL(${_optLast})" with _remote_cmd="openURL(${_optLast},new-tab)".

You can also replace "new-tab" with "new-window" if you want to open the URLs in a new window. This tip may also work for Mozilla's "mozilla" startup script, usually located at some place like "/usr/bin/mozilla/mozilla".