← Back to team overview

ubuntu-phone team mailing list archive

Re: Change default browser

 



On Thursday, 17 December 2015 6:55:07 AM AEDT, Olivier Tilloy wrote:
On Wed, Dec 16, 2015 at 7:42 PM, Michał Sawicz
<michal.sawicz@xxxxxxxxxxxxx> wrote:
W dniu 16.12.2015 o 18:57, Olivier Tilloy pisze:
Aside from being installed by default (and not uninstallable) and
having a hardcoded icon to it at the top of the applications scope,
there is nothing specific done to make webbrowser-app "default".

Its desktop file contains the following line:

MimeType=text/html;text/xml;application/xhtml+xml;x-scheme-handler/http;x-scheme-handler/https;

whichs registers it with the system as a handler for http:// and
https:// links. I suppose other browsers could do the same (just
checked liri, and it doesn’t have such a line in its desktop file).

Isn't it rather that .url-dispatcher file?

/usr/share/url-dispatcher/urls/webbrowser-app.url-dispatcher

You are right of course, url-dispatcher doesn’t use the
x-scheme-handler definitions from the desktop file, it has its own
configuration files.


I
wonder what url-dispatcher would do if it encountered two apps that
claim to be capable of handling those URLs. I guess something along
the lines of showing a dialog to allow the user to choose which app to
use (and maybe a checkbox to save a default choice), but I’m not sure
whether this is implemented yet.

Today, url-dispatcher goes for most-specific, there's no UI yet to break
a deuce, but it's been discussed as the obvious option.

The liri browser doesn’t seem to be shipping a url-dispatcher config
file, but I wonder what would happen if it did. What if two apps
register for the "http" protocol, without further specifics? How does
url dispatcher pick one over the other?


With url-dispatcher, the first installed app seems to get registered. Have had to uninstall apps in the past to get a different one to register as the url catcher. Not sure if this would be the same for browsers catching all http urls.

M

--
Sent using Dekko from my Ubuntu device


References