The recent discussion raises again something that has been a need for a very long time.
Some programs support URLs (Exec=foo %u) but not all URLs. For instance VLC supports http, ftp, and smb. We need to know that we can pass it such URLs, and not others. I would like to propose a key UrlSchemes in the desktop entry standard, as a ;-separated list of supported URL schemes. For instance, for vlc: UrlSchemes=http;ftp;smb; For applications that use a VFS framework, listing all supported URL schemes is impossible. Instead, I suggest UrlSchemes=KIO or UrlSchemes=GIO. This of course raises another issue, which is that KDE code can easily know what KIO expands to, but not what GIO expands to. And of course some schemes are not necessarily named the same. I don't propose to solve this completely now, we can just assume a basic set of schemes for now, but I would already be quite happy with a standard UrlSchemes key, for all the solvable cases. For backwards compatibility, what I did in KDE was to also have logic like: * If no %u/%U, then no URLs supported. * If UrlSchemes key is present, use that. * Otherwise look at Categories, and if it contains KDE, then assume UrlSchemes=KIO * Otherwise fallback to: http;https;ftp; which seems like a reasonable default for apps that claim to support URLs. (In KDE the key is currently named X-KDE-Protocols, but I guess UriScheme is the proper name for what the historic kde code has called protocols) (And the reason for all this is that if the app doesn't support the URL scheme, we instead download to a local file, pass to the app, and delete the file when the app is closed; so just blindly passing all URLs to the app and hoping for the best, isn't really a valid solution) Does this change to the spec seem reasonable? If yes I'll try to figure out the git repo and whether I have write access to it ;) -- David Faure, [email protected], http://www.davidfaure.fr Sponsored by Nokia to work on KDE, incl. Konqueror (http://www.konqueror.org). _______________________________________________ xdg mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/xdg
