As one can resize the icons on desktop (not within nautilus) through righ-click menu: "Resize icon..", so where is the size stored for that certain file.

  • Have you looked at /usr/share/pixmaps ? – William Dec 14 '11 at 17:55
  • I meant those preview icons for my custom photo files or documents. IMHO they cannot be stored in /usr since you need extended privileges for that. – math Dec 14 '11 at 18:41

File attributes for icons are stored in binary files inside ~/.local/share/gvfs-metadata/.

To read an attribute for a file you need to use the gvfs-info command supplied by the gcfs-bin package.

To read the complete metadata stored from a file/folder on the gvfs use gvfs-info -a "metadata::*" <path_to_file/folder>, ie

gvfs-info -a "metadata::*" /home/bruno/Desktop/Screenshot\ at\ 2011-12-14\ 21:29:29.png

  metadata::icon-scale: 2.6875
  metadata::nautilus-icon-position-timestamp: 1323894580
  metadata::nautilus-icon-position: 77,15

To set an attribute inside the gvfs you use the command gvfs-set-attribute which is also part of gvfs-bin as this gvfs-set-attribute <path_to_some_file/folder> metadata::some-key "some_value"

If you want to change the scale of an icon in gnome you need to change the icon-scale attribute so for the file shown before if I wanted to reset the scale to 1 would do that as this

gvfs-set-attribute /home/bruno/Desktop/Screenshot\ at\ 2011-12-14\ 21:29:29.png metadata::icon-scale "1"

Unfortunately I could only see the changes after I logged off and back in on, unity --replace & did not do the trick. I am not sure if you can force Gnome to reload the data from the gvfs binaries.

  • I think you got my question wrong. On desktop icons there is a right-click menu "Resize icon...". If you click on that you get blue corners which you can drag and drop to a certain size, There are definitely more than 7 discrete levels. So where is that icon size parameter stored for that certain file on the desktop? – math Dec 1 '11 at 16:05
  • Sorry really imagined you wanted to change all the icons at the same time, will delete this and change it when I get the answer right. – Bruno Pereira Dec 1 '11 at 17:56
  • 1
    Updated answer to fit your question. – Bruno Pereira Dec 14 '11 at 21:10
  • Great even the thumbnail path is shown! – math Dec 15 '11 at 2:49
  • To reload the metadata, quit nautilus using nautilus --quit and then restart it using nautilus -n. Its important to run the last command using your desktop shell's "Run Command" because it will block your console and die when you quit the console. – Guss Dec 21 '15 at 6:33

The icons doesnt really have a size, they are all SVG which are infinite on size.

The Size which nautilus use to display it inside itself its stored on the Nautilus hidden folder on your $HOME (in .config/nautilus, but this may differ on newer versions)

  • The .config/nautilus/desktop-metadata file contains only metadata for "special icons" on the desktop, such as your trash. – Guss Dec 21 '15 at 6:35

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.