如何找到 nautilus 选择显示的图标文件?

如何找到 nautilus 选择显示的图标文件?

我正在尝试为 mime 类型设置图标关联,但 Nautilus 显示的是空白图标。如何才能找到 Nautilus 选择显示的图标文件(小路这个空白图标)?

带有空白图标的图像

相关gio info mcc.nex输出:

display name: mcc.nex
edit name: mcc.nex
name: mcc.nex
type: regular
size:  217017
attributes:
  standard::type: 1
  standard::is-hidden: FALSE
  standard::is-backup: FALSE
  standard::is-symlink: FALSE
  standard::name: mcc.nex
  standard::display-name: mcc.nex
  standard::edit-name: mcc.nex
  standard::copy-name: mcc.nex
  standard::icon: application-vnd.treeviewer.nexus.nex, application-x-generic, application-vnd.treeviewer.nexus.nex-symbolic, application-x-generic-symbolic
  standard::content-type: application/vnd.treeviewer.nexus.nex
  standard::fast-content-type: application/vnd.treeviewer.nexus.nex
  standard::size: 217017
  standard::allocated-size: 217088
  standard::symbolic-icon: application-vnd.treeviewer.nexus.nex-symbolic, application-x-generic-symbolic, application-vnd.treeviewer.nexus.nex, application-x-generic

相关ls .local/share/icons/hicolor/*/mimetypes/application-vnd.treeviewer.nexus.nex*输出(这些都不是空白图像):

.local/share/icons/hicolor/16x16/mimetypes/application-vnd.treeviewer.nexus.nex.png
.local/share/icons/hicolor/256x256/mimetypes/application-vnd.treeviewer.nexus.nex.png
.local/share/icons/hicolor/32x32/mimetypes/application-vnd.treeviewer.nexus.nex.png
.local/share/icons/hicolor/48x48/mimetypes/application-vnd.treeviewer.nexus.nex.png
.local/share/icons/hicolor/512x512/mimetypes/application-vnd.treeviewer.nexus.nex.png
.local/share/icons/hicolor/64x64/mimetypes/application-vnd.treeviewer.nexus.nex.png

答案1

就我而言,我将图标(一个.png文件;但.svg文件会更好)复制到目录中/usr/share/icons/Adwaita/scalable/mimetypes/,其中Adwaita是我当前的图标方案,然后运行:

$ sudo gtk-update-icon-cache /usr/share/icons/Adwaita/

我假设您已经创建或检查了 MIME 类型的正确性,如为个人用户添加自定义 MIME 类型(GNOME 帮助网站)

笔记:我尝试将/usr/share/icons/Adwaita/目录复制到我当前用户的~/.local/share/icons/目录中并尝试相同操作,但没有成功。:(欢迎提出任何关于基于用户的配置而不是系统范围的配置的评论。

相关内容