鹦鹉螺地方的自定义符号图标

我知道可以使用使用设置文件夹的自定义图标

gvfs-set-attribute /home/folder metadata::custom-icon-name folder-whatever 

但是nautilus在侧边栏树中使用了symbol standard::symbolic-icon (?)的standard::symbolic-icon

是否可以使用gvfs-set-attribute (或任何其他方法)设置自定义符号图标?

可能不会,因为它会导致此错误:

  Error setting attribute: Setting attribute standard::symbolic-icon not supported 

您可以通过运行以下命令列出文件夹/文件的可写属性(例如$HOME ,用户的主目录):

  gvfs-info -w $HOME 

为此,我得到:

 Settable attributes: standard::symlink-target (bytestring) time::access (uint64, Keep with file when moved) time::access-usec (uint32, Keep with file when moved) time::modified (uint64, Copy with file, Keep with file when moved) time::modified-usec (uint32, Copy with file, Keep with file when moved) unix::gid (uint32, Keep with file when moved) unix::mode (uint32, Copy with file, Keep with file when moved) unix::uid (uint32, Keep with file when moved) Writable attribute namespaces: metadata (string, Copy with file, Keep with file when moved) xattr (string, Copy with file, Keep with file when moved) xattr-sys (string, Keep with file when moved) 

对于标准文件夹图标,这由metadata::custom-icon metadata名称空间下的metadata metadata::custom-icon (或其他)设置。 未列出的任何其他属性都不可写 – 包括standard::symbolic-iconNB创建metadata::symbolic-icon或类似物并重新启动nautilus似乎也没有效果

来源/更多信息

  • man gvfs-info
  • GFileAttribute 可能会有所帮助 – 从手册页链接