# How to run xdg-mime to register a new protocol

**URL:** <https://discourse.appimage.org/t/how-to-run-xdg-mime-to-register-a-new-protocol/1711>\
**Category:** Creating AppImages\
**Created:** [May 23, 2020, 4:57pm UTC](https://discourse.appimage.org/t/how-to-run-xdg-mime-to-register-a-new-protocol/1711 "2020-05-23T16:57:20Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![monocasual](https://avatars.discourse-cdn.com/v4/letter/m/b487fb/32.png) [@monocasual](https://discourse.appimage.org/u/monocasual)\
**Post date:** [May 23, 2020, 4:57pm UTC](https://discourse.appimage.org/t/how-to-run-xdg-mime-to-register-a-new-protocol/1711/1 "2020-05-23T16:57:20Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![probono](https://yyz1.discourse-cdn.com/flex027/user_avatar/discourse.appimage.org/probono/32/81_2.png) [@probono](https://discourse.appimage.org/u/probono)\
**Post date:** [May 31, 2020, 4:44pm UTC](https://discourse.appimage.org/t/how-to-run-xdg-mime-to-register-a-new-protocol/1711/2 "2020-05-31T16:44:54Z")

</div>

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](https://github.com/AppImage/appimaged/issues)), along with a link to an example AppImage so that we can see what is going on. Thanks!
