phu*_*ehe 5 gentoo file-management freedesktop mime-types
在没有桌面环境的情况下运行的 Gentoo 机器上,每次我尝试打开文件时,系统都会尝试使用 Firefox 打开它。我知道没有桌面环境“打开文件”无法正常运行,但为什么一切都用 Firefox 打开?如果我想,我可以将其更改为其他内容吗?
通常这些信息在两个地方处理:
MIME 数据库可以通过编辑.local/share/applications/mimeapps.list
和.local/share/applications/mimeinfo.cache
. 允许编辑它的工具xdg-mime
来自x11-misc/xdg-utils
. 请注意 man 声明它只能从桌面会话中使用。
编辑请注意,某些应用程序(如 Firefox)不尊重 MIME 数据库设置。