Back to Eric's Home Page | Up to Site Map | $Date: 2002/08/02 09:35:33 $ |
What comes next after the classic Unix environment variables
PAGER
, MAILER
, and
EDITOR
?
This is the BROWSER
project page -- an effort to
promulgate a convention for expressing your browser preference to
programs which must call browsers to view URLs. Nowadays many
programs must do this; mailer user agents and on-line help systems
are just two of the most obvious application classes.
The value of BROWSER may consist of a colon-separated series of browser command parts. These should be tried in order until one succeeds. Each command part may optionally contain the string "%s"; if it does, the URL to be viewed is substituted there. If a command part does not contain %s, the browser is to be launched as if the URL had been supplied as its first argument. The string %% must be substituted as a single %.
Rationale: We need to be able to specify multiple browser commands so programs obeying this convention can do the right thing in either X or console environments, trying X first. Specifying multiple commands may also be useful for people who share files like .profile across multiple systems. We need %s because some popular browsers have remote-invocation syntax that requires it. Unless %% reduces to %, it won't be possible to have a literal %s in the string.
For example, on most Linux systems a good thing to do would be:
BROWSER="netscape -raise -remote \"openURL(%s,new-window)\":lynx"
In the near future, any Python program that uses the
standard-library webbrowser.py module. This module, which debuted
in Python 2.0, was taught how to interpret BROWSER
in
CVS on 23 Jan 2001, and will be released in Python 2.1a2.
On 24 Jan 2001, a BROWSER
patch against the 0.9 version was sent to
the maintainers of urlview.
On 24 Jan 2001, a BROWSER
patch was sent to the maintainer of the
browser-launch code in GNU Emacs.
On 24 Jan 2001, a patch against the
environ(5) man page was sent to Andries Brouwer, the Linux man page
maintainer, adding BROWSER
to the set of documented
environment variables. Andries merged in an edited version within
hours.
On 25 Jan 2001, Pavel Roskin told me "I hope to be able to implement $BROWSER support in xpdf but I cannot promise it."
Key people in the Perl and Tcl communities (including Larry
Wall) have agreed that it would be a good thing for the URL-viewing
facilities in their language libraries to interpret
BROWSER
, but this has not been done yet.
If you implement BROWSER
support somewhere, please
let me know for this page.
Back to Eric's Home Page | Up to Site Map | $Date: 2002/08/02 09:35:33 $ |