0

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

  MimeType=image/x-targa;image/x-tga;image/x-pcx;image/gif;image/png;image/x-xpixmap;image/x-xpm;image/tiff;image/tiff-fx;image/x-ms-bmp;image/jpeg

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

6
  • Can you provide more details: which .deskop file and what app? Did you have the problem before editing the .desktop file? Commented Sep 1, 2017 at 6:50
  • Added the program name & complete mimeType line
    – MegaTux
    Commented 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
    Commented Sep 5, 2017 at 13:37
  • 1
    Also add %U to exec Commented 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
    Commented Sep 5, 2017 at 21:15

3 Answers 3

1

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

2
  • Good! The update-desktop-database command shows some syntax errors on my editing. Will try to fix & retry.
    – MegaTux
    Commented 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
    Commented Sep 4, 2017 at 20:11
1

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

0

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.

1
  • 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. Commented 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.