I edited a .desktop (mtPaint) file to add missing mime types it can handle:


but I don't get File to recognize this App when "Open with" on a file of that type. I tried logoff & login.

  • Can you provide more details: which .deskop file and what app? Did you have the problem before editing the .desktop file? Sep 1, 2017 at 6:50
  • Added the program name & complete mimeType line
    – MegaTux
    Sep 4, 2017 at 20:09
  • Also added the %f param to exec. Now I can see the program when displaying All-apps but still not available for all the files with the mime types I added.
    – MegaTux
    Sep 5, 2017 at 13:37
  • 1
    Also add %U to exec Sep 5, 2017 at 18:17
  • The problem was I was editing a copy of the .desktop file on my $HOME dir located at ~/.local/share/applications/ . Looks like the global one at /usr/share/applications/ has priority over the personal one.
    – MegaTux
    Sep 5, 2017 at 21:15

3 Answers 3


I think you need to update the miminfo.cache using update-desktop-database command.

  • Good! The update-desktop-database command shows some syntax errors on my editing. Will try to fix & retry.
    – MegaTux
    Sep 4, 2017 at 19:59
  • Fixed the error (extra space at the end of line) & rerun the update-desktop-database command but still no menu entry added on Files
    – MegaTux
    Sep 4, 2017 at 20:11

Compare the .desktop file of mtpaint with another .desktop file of an app that works and see what's missing or what's different. You might need to add %U at the line Exec, so you will have: Exec=mtpaint %U


The problem was I was editing a copy of the .desktop file on my $HOME dir located at ~/.local/share/applications/. Looks like the global one located at /usr/share/applications/ has priority over the personal one. Seems like a bug on pantheon-files to me. The copy at $HOME was created by a GUI menu tool. The %U (or %f ?) at the Exec like is also required.

  • FIles relies on system calls to determine which app handles which mime-type so may not be a Files bug. Try rebooting and if it persists then see whether Thunar behaves similarly. Sep 7, 2017 at 15:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.