Allow snaps to register new mime types?


snapd, when installing a snap, has some logic to parse desktop files and generate a mimeinfo.cache file that associates mime types to desktop files.

This allows e.g. a snapped app to advertise that it handles the application/x-foobarbaz mime type.

However there doesn’t seem to be a way for the snap to register application/x-foobarbaz as a new mime type (according to the shared-mime-info spec) so that it is recognized by the host system.

This would require invoking update-mime-database on a directory containing xml descriptions.

Are there any plans to add this functionality to snapd?

Proposal: support the icon theme spec for desktop icons

I recently wrote an app that requires this functionality. It needs to register a MIME type for a file type that is downloaded from a website. For this reason I was unable to distribute it as a Snap, and have to fall back to using a PPA. I’m sure there’s lots of other apps that would fall into this category that would benefit from being shipped as Snaps.


Has there been progress or updated plans in this area?