如何更改 XML 文件的默认应用程序?

cra*_*0zy 4 default-programs xml 15.10

我有 Ubuntu 15.10

因此,更改 XML 文件的默认应用程序会立即被默认浏览器覆盖,并且不会保留更改。

如何将 Gedit 设置为 XML 文件的默认应用程序?

编辑:如果需要,我使用 GNOME 作为 DE

cra*_*0zy 10

Oh thank god, I have a solution.

First of all the problem is getting caused by "Default Applications" in "Settings" on "GNOME", in order to save the default application for something like browser it overrides whatever it has as default for a set off applications and creates a double entry under ~/.config/mimeapps.list. This way the default application for that mimetype cannot be changed unless you manually delete the entry for it. To do it:

  • edit the file: ~/.config/mimeapps.list
  • find the [Default Applications]
  • delete application/xml, there is a 2nd entry under [Added Associations] which we want to keep
  • 保存文件并退出
  • 去任何XML文件,而现在的默认应用程序可以通过去改变Right Click> Properties>Open With

这可能是 GNOME 中的一个错误。