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.

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

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 '17 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 '17 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.

  • 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. – Jeremy Wootten Sep 7 '17 at 15:53

Your Answer

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

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