Applications in GUI environments represented by desktop entries (files with the desktop extension) can include a key called MimeType for supported MIME types for that application.

Some applications have several desktop entries for (possibly optional) sub components, which lists different supported MIME types.

For example, Okular, have (in /usr/share/applications/):

  • org.kde.okular.desktop which lists application/vnd.kde.okular-archive.
  • okularApplication_chm.desktop which lists application/x-chm.
  • ...
  • okularApplication_pdf.desktop which lists application/pdf;application/x-gzpdf;application/x-bzpdf;application/x-wwf;.
  • ... and so on.

Which all run the same command: Exec=okular %U.


What is the correct way to associate MIME type with applications that have multiple desktop entries, in a mimetype.list file?


  • application/pdf=org.kde.okular.desktop, or,
  • application/pdf=okularApplication_pdf.desktop?

The first one seems incorrect since org.kde.okular.desktop does not specify the MIME type as supported.

If both work equally well, then is there any convention?

If there are no correct way or convention, then that is a fine answer.

The specification for XDG MIME Applications is not clear about this.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.