How to run xdg-mime to register a new protocol

Hi all,

I want to distribute an AppImage that supports custom url protocols (e.g. skype://), so that the app automatically opens when user clicks the corresponding link. Usually this is done by adding a MimeType field to the .Desktop file and adding the custom protocol to the list of known protocols with xdg-mime.

The first task is easy, as the .Desktop file is shipped within the AppImage. However, I’m not sure at which stage I should run xdg-mime. I’m pretty sure the appimaged daemon is involved here, but how?

Hi @monocausal, welcome to AppImage.

If your user wants to have AppImages integrated into the system and hence is runnning appimaged (or another such tool), then your MIME type should automatically be associated to your application if you put it into its .desktop file.

If that is not happening, please file a ticket in the project that does the desktop integration (e.g., appimaged), along with a link to an example AppImage so that we can see what is going on. Thanks!