Make external programs in Linux use the right browser: Difference between revisions

From MozillaZine Knowledge Base
Jump to navigationJump to search
mNo edit summary
(Firebird --> Firefox)
Line 1: Line 1:
Question: How do I configure external programs in Linux to open URLs in Firebird?
Question: How do I configure external programs in Linux to open URLs in Firefox?


Answer: Configure each external program to pass the URL to this Bourne shell script:
Answer: Configure each external program to pass the URL to this Bourne shell script:
Line 5: Line 5:
'#'!/bin/sh<br>
'#'!/bin/sh<br>
'#'<br>
'#'<br>
'#' This script allows external apps to open new URLs in Firebird<br>
'#' This script allows external apps to open new URLs in Firefox<br>
'#' or open a new instance of Firebird if it isn't already started<br>
'#' or open a new instance of Firefox if it isn't already started<br>
'#'<br>
'#'<br>
/home/theonekea/MozillaFirebird/MozillaFirebird -remote "openURL($@,new-tab)" ||
/home/theonekea/MozillaFirefox/MozillaFirefox -remote "openURL($@,new-tab)" ||
exec /home/theonekea/MozillaFirebird/MozillaFirebird "$@";
exec /home/theonekea/MozillaFirefox/MozillaFirefox "$@";


(replace /home/theonekea/MozillaFirebird with the correct path to your installation of Firebird).
(replace /home/theonekea/MozillaFirefox with the correct path to your installation of Firefox).


This shell script takes advantage of the Mozilla IPC protocol to either open the external URL in an already-active Firebird invocation, or start a new invocation of Firebird.
This shell script takes advantage of the Mozilla IPC protocol to either open the external URL in an already-active Firefox invocation, or start a new invocation of Firefox.

Revision as of 19:50, 9 February 2004

Question: How do I configure external programs in Linux to open URLs in Firefox?

Answer: Configure each external program to pass the URL to this Bourne shell script:

'#'!/bin/sh
'#'
'#' This script allows external apps to open new URLs in Firefox
'#' or open a new instance of Firefox if it isn't already started
'#'
/home/theonekea/MozillaFirefox/MozillaFirefox -remote "openURL($@,new-tab)" || exec /home/theonekea/MozillaFirefox/MozillaFirefox "$@";

(replace /home/theonekea/MozillaFirefox with the correct path to your installation of Firefox).

This shell script takes advantage of the Mozilla IPC protocol to either open the external URL in an already-active Firefox invocation, or start a new invocation of Firefox.