Associate MIME types

Associate files with your application, using MIME types.

If your application opens files of a certain type, such as PNG images, you can add an association with the MIME type of the file. This is added to the desktop file.

myapplication.desktop

[Desktop Entry]
Name=My Application
Exec=myapplication
Type=Application
MimeType=image/png

For this hypothetical application, image/png is listed as the supported MIME type.

Custom MIME types can be added to the system-wide MIME database, but this is outside the scope of this guide. See the Shared MIME-Info Database specification for more details.