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.
[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. Thespecification for more details.
This work is licensed under a.
As a special exception, the copyright holders give you permission to copy, modify, and distribute the example code contained in this document under the terms of your choosing, without restriction.
Got a comment? Spotted an error? Found the instructions unclear? Send feedback about this page.