On Sat, 2016-04-02 at 12:57 +0300, Antti Järvinen wrote: > Dear Sirs, > > There is a mechanism in .desktop files for advertising capability to > handle URI schemes. Basically having foobar-app.desktop that includes > line > MimeType=application/x-foobar;x-scheme-handler/foobar; > tells that URIs of form foobar://... are handled by foobar-app. This is > ok and works. But, there is a medium-sized problem, or medium-sized > misunderstanding from my side: before xdg-open actually starts > launching foobar-app for URIs of form foobar://... each and every > users needs to individuall say > xdg-mime default foobar-app.desktop x-scheme-handler/foobar [...] That seems reasonable if there is a choice between multiple implementations of a scheme, but if only one is installed then I agree this should be automatic. According to the manual page for dh_desktop: If a package ships desktop files, they just need to be installed in the correct location (/usr/share/applications) and they will be registered by the appropriate tools for the corresponding desktop environments. On my laptop, desktop-file-utils installs a file trigger for this directory and when triggered it runs "update-desktop-database -q". (mime-support also installs a file trigger and runs "/usr/sbin/update-mime --triggered" to update the old /etc/mailcap file.) It seems to me that update-desktop-database ought to build a register of schemes as well, and xdg-open could then use that register. Ben. -- Ben Hutchings Larkinson's Law: All laws are basically false.
Attachment:
signature.asc
Description: This is a digitally signed message part