I have a website that serves dynamic eml / mbox files with a content type of message/rfc822. To open them in the MUA, I have the MIME type associated:

$ xdg-mime query default message/rfc822

Likewise ~/.mailcap and ~/.config/mimeapps.list.

It works flawlessly in Konqueror but not Firefox 56.0. Firefox simply ignores the .desktop file. Instead, it offers to open the link in the editor (associated with text/plain).

Choosing the option “other” in the menu “Applications”, one can navigate to and select the appropriate .desktop file but the setting has no effect and the editor is restored next time the menu is opened.

firefox fail

Setting this to “always ask” offers an option to run xdg-open on it, but this loses the content-type and again, the editor is chosen.

How to coax Firefox into adhering to the XDG setup?

  • Write a wrapper script that consists of exec mutt -f "$@". At option other pick the script, not the .desktop file. – Satō Katsura Oct 24 '17 at 16:49
  • That’s what I do anyways since I have to preprocess the EML served into a mbox for Mutt. That’s what’s invoked (with extra parms) by the .desktop file. Passing the script directly works, I know that. I just prefer GUI programs like FF to play nicely with the rest of the system. – phg Oct 26 '17 at 7:17
  • You do understand there's a difference between what you want and what is actually implemented, right? – Satō Katsura Oct 26 '17 at 7:59
  • Firefox abides by XDG elsewhere e. g. by creating XDG_DOWNLOAD_DIR and the likes without being asked so it’s reasonable to expect it to do so in this case as well. – phg Oct 26 '17 at 12:27
  • I didn't say it's unreasonable to expect it. What I'm saying is it isn't implemented that way. Don't shoot the messenger. Please feel free to complain to Firefox developers if you disagree with that behavior. Only Firefox developers can change it. shrug – Satō Katsura Oct 26 '17 at 21:04

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.