I removed Documents
Pictures
and Downloads
from my home directory, and I linked them to directories on different disks. And now Documents
and Pictures
have lost their nice categorized icon of a camera and, well, documents.
Interestingly, Downloads
did not.
$ gio info ~/Documents | grep symbolic-icon
standard::symbolic-icon: folder-symbolic, folder
$ gio info ~/Pictures | grep symbolic-icon
standard::symbolic-icon: folder-symbolic, folder
$ gio info ~/Downloads | grep symbolic-icon
standard::symbolic-icon: folder-download-symbolic, folder-symbolic, folder-download, folder
You can find those keywords in one of the many themes installed on the computer, because these are named according to a spec. This means they don't need a path, because chaning your theme will automatically change the icon too, in the new theme style, but in the designated category (e.g. Downloads). It will look for any of the listed names in the chosen theme.
$ ls -1 /usr/share/icons/Mint-Y/places/symbolic | grep folder
folder-documents-symbolic.svg
folder-download-symbolic.svg
folder-music-symbolic.svg
folder-pictures-symbolic.svg
folder-publicshare-symbolic.svg
folder-remote-symbolic.svg
folder-saved-search-symbolic.svg
folder-symbolic.svg
folder-templates-symbolic.svg
folder-videos-symbolic.svg
However, I am not allowed to set this.
$ gio set ~/Documents standard::symbolic-icon folder-documents-symbolic
gio: Setting attribute standard::symbolic-icon not supported
$ gio set ~/Pictures standard::symbolic-icon folder-pictures-symbolic
gio: Setting attribute standard::symbolic-icon not supported
Turns out, you can only set metadata::custom-icon
, But it does not support global icon names. You need to specify an exact path, meaning you need to fix all your icons when you change your theme!
I don't know how it works technically, why the symbolic-icon
metadata has disappeared. But even though I cannot set it with GIO
, It is defined somewhere, for certain folders.
Where is this defined? If I cannot do it as user, I should be able to do it as root
. I will recompile things if I have to. I want my flipping folder icons back!
Using Ubuntu 18.04/Linux Mint 19 w/ Cinnamon > Nemo
I finally figured it out. This metadata is not stored with the directories, but in a single file. You can edit this file and even set directories outside of your home, in case you have directories deferred to different partitions.
You won't see the changes until you log out and in again, but you can verify the value of
standard::icon
usinggvfs-info <dirname>
,-update-
You can also use the
xdg-user-dirs-update
command to update this file: