I already know how to create a custom URL scheme and set its handler using xdg-utils:
xdg-settings set default-url-scheme-handler name handler.desktop
However, the command affects only the current user. Is there any way (preferably using xdg-utils, as portability is my concern) to register handler.desktop
as the application to handle name
URLs for all users on my system (when any user runs xdg-open name://something
, handler.desktop
should be called?
Update: For my Ubuntu machine, appending a line into /usr/share/applications/defaults.list
seems to work:
x-scheme-handler/name=handler.desktop
Is this method portable?