[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: web browser url viewing proposal



> 
> - Various browsers register mime types for text/html and so on,
>   and that works ok. It is out of the scope of this proposal.
> ...
> 
> My proposal adds:
> 
> - /usr/bin/x-www-browser alternative formalized in policy
> - /usr/bin/www-browser alternative added for non-X browsers
> - /usr/bin/sensible-browser, presumably to debianutils, a sample
>   implementation attached to this message understands BROWSER,
>   and can use www-browser or x-www-browser as fallback
> - programs that want to open an url in a browser can call
>   sensible-browser or check BROWSER themselves with fallback

I agree. I have an open bug about this on one of my packages and in
another package I used a hardcoded list of browsers to try in sequence.
Therefore I was about to propose something similar.

I propose also that sensible-browser is registered as preferred or only
handler for text/html and other url mime types. This can obviously be
overriden in personal mailcap files but the debian alternative and the
BROWSER variable should be the preferred control it.

> In addition, programs should choose a good default web browser if none
> is selected by the user or system administrator.

This should be done in a centralized way by sensible-browser. Other programs
should call only sensible-browser, unless they require some specific browser.
If none selects a good default the x-www-browser alternative should do it.

> Thus, every program that launches a web browser with an URL must use the
> BROWSER environment variable to determine what browser the user wishes
> to use.

Again, why not just call sensible-browser? A program needing a browser
should simply depend on debianutils and www-browser|x-www-browser.
Parsing the BROWSER variable and substituting the url value in the proper
way in every program seems to me an unnecessary duplication of code.

Another utility that I would like to see in debianutils (or some other pkg)
is a program to encode/decode an url. This would probably be useful also
for the sensible-browser script.

-- 
Massimo Dal Zotto <dz@debian.org>



Reply to: