为提升您的使用体验,本站正在维护,部分功能暂时无法使用。如果本站文章无法解决您的问题,您想要向社区提问的话,请到 Twitter 上的 @FirefoxSupport 或 Reddit 上的 /r/firefox 提问,我们的支持社区将会很快回复您的疑问。

搜索 | 用户支持

防范以用户支持为名的诈骗。我们绝对不会要求您拨打电话或发送短信,及提供任何个人信息。请使用“举报滥用”选项报告涉及违规的行为。

详细了解

Application missing from "Applications" dialog, so how can I set it to "Always Ask"?

  • 5 个回答
  • 2 人有此问题
  • 10 次查看
  • 最后回复者为 cor-el

more options

When I download some file types, such as CSV or JSON, they automatically open in LibreOffice.

I want to use a different program for JSON files.

However, when I navigate to the "Applications" settings dialog, none of these file types are listed. There is no entry for CSV, nor for JSON, nor are there any mentions of LibreOffice whatsoever.

This dialog does not let me add new file types, so I am at a loss as to how to change this behavior.

Are these settings hidden away somewhere in my profile directory, perhaps? Can I edit them there?

Note: The same occurs if I click on the downloaded file from the "Downloads" list.

When I download some file types, such as CSV or JSON, they automatically open in LibreOffice. I want to use a different program for JSON files. However, when I navigate to the "Applications" settings dialog, none of these file types are listed. There is no entry for CSV, nor for JSON, nor are there any mentions of LibreOffice whatsoever. This dialog does not let me add new file types, so I am at a loss as to how to change this behavior. Are these settings hidden away somewhere in my profile directory, perhaps? Can I edit them there? Note: The same occurs if I click on the downloaded file from the "Downloads" list.

所有回复 (5)

more options

Note: I suppose this might be related to this 3-year-old-but-not-fixed bug: https://bugzilla.mozilla.org/show_bug.cgi?id=727422

more options

Go to the "Applications" page, and use its search bar.

more options

The file action usually depends on with what content-type the server sends the file.

You can use the Live Http Headers extension to check the content type.

If the server sends the file as a generic type like "application/octet-stream" then you can't set an action, but that wouldn't happen if a specific application is chosen.

You can check the mimeTypes.rdf file in the Firefox profile folder for a reference to the file extension.

You can use this button to go to the current Firefox profile folder:

more options

cor-el said

The file action usually depends on with what content-type the server sends the file.

It is true that the server is giving a bogus content type.

However, that can't be the full issue, since I have the same problem when clicking the downloaded file in the "Downloads" listing.

Further, different applications are launched for the .json vs .csv file, so FireFox is clearly somehow distinguishing them (Writer is opened for one, Calc for the other).

You can check the mimeTypes.rdf file in the Firefox profile folder for a reference to the file extension.

There is no mention of libreoffice in here whatsoever.

This is on Linux, and it seems like application selection is a bit messy there (see the bug I referenced), so i'm not 100% sure where that info is coming from.

Possibly /usr/share/applications/mimeinfo.cache, which it really should not be using (again, see bug).

Bleh, this is a bit of a rabbit hole (:

more options

You can use a command like this in a terminal window to check (query) the default application and set the default application.

  • MIME type:
    xdg-mime query default application/pdf
  • File extension:
    xdg-mime query filetype *.pdf
  • Set default application for a MIME type:
    xdg-mime default evince-2.desktop application/pdf