Most icon themes have a set of different sized icons that will be used for the same thing but change depending on the size of the icon being viewed. In nemo, if I want to change the icon of a file or folder, I can just go to properties, click on the icon, and choose a new icon. However, nemo will use the same icon file no matter what the size of the icon is, whether you use list view, icons view, compact, etc.

How do I change the icon on a file or folder and make it so that nemo will use the proper sized icon depending on the current view (ie 16x16 png for list view, scalable svg for icons view, etc.)?

  • This question answers my question for Nautilus. However, the answer doesn't seem to work for me. This could be because I'm running a GTK+ theme, but I'm not sure. – T.C. Proctor Sep 24 '14 at 16:59

It turns out that the question I mentioned in the comments regarding nautilus does work for nemo. However, if you have already set the folder via this method, you need to undo that information. If you're trying to change the icon for a_folder from /file_location/icon.svg to the set of icons all named a_folder_icon, for example, you can figure out the current icon info with the command

gvfs-info a_folder

This will output a bunch of data about this location, there will be a line with

metadata::custom-icon: file:///file_location/icon.svg

showing the icon metadata. By entering the command

gvfs-set-attribute -t unset a_folder metadata::custom-icon /file_location/icon.svg

you can remove this metadata, and gvfs-info a_folder should no longer list the icon you set. Now you can set the icon name with

gvfs-set-attribute a_folder metadata::custom-icon-name a_folder_icon

However, this does not seem to change the icon in the nemo sidebar, and it might be impossible to do so.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.