Is there some way to achieve icon persistence on Ubuntu with nautilus or some other file manager? So far when I change an icon from the properties of the folder the change won't remain visible if copied to another disk.

EDIT : I found a file .directory that Kubuntu had installed in my Ubuntu distro. It seems to have data about icons but I can't figure out how it works.

  • Asking how Windows works, is off topic. Please clarify your question to clearly state what it is you are trying to do. And don't complane that nobody has answered yet, or say that "I don't think it's possible" is an acceptable answer, when you then complain about such an answer being made.
    – dobey
    Apr 19, 2014 at 23:52
  • at least for drives: askubuntu.com/questions/70867/… and I can think of a way by making a custom launcher for a hidden folder that might work ;) sit tight for a bit.
    – Mateo
    Apr 20, 2014 at 2:27
  • Yes this .ico for drives is exactly the type of things I want for any folder.
    – sinekonata
    Apr 20, 2014 at 2:37
  • but not possible like that ;)
    – Mateo
    Apr 20, 2014 at 2:40
  • Ok I figured so. Thank you though :D
    – sinekonata
    Apr 20, 2014 at 2:42

2 Answers 2


Ok, this requires getting creative! For this we are going to "hack" together a .desktop file that will then launch the folder, the .desktop file can have a icon that will be the same.

  1. In you Documents folder Create your folder but name it with a . so it will become "hidden" example .new
  2. Find your icon example icon.png and put it in your folder also put a . in front ex .icon.png
  3. Make a third file called foldername.desktop( How can I create launchers on my desktop? ) open it in a editing program like gedit and paste this:

    [Desktop Entry]

    but replace "mateo" with your user name for the icon and folder paths, and "Folder" with your folder name.

  4. Make the foldername.desktop file executable - How do I mark a file as executable via a GUI?
  5. Now to copy the folder needs to be in the same place - but the launcher can move anywhere - don't forget that the "real" folder is hidden - you can view them -> view -> show hidden files. So now you can have a folder within a drive that will be viewed the same on two different Ubuntu computers.

enter image description here

It wasn't easy, and most people stick with letting the theme do the job ;)

  • This is perfect. I'll use them for only 40+ folders so it's not as easy as the Windows method but for all intents and purposes it does the same. Thanks for the effort. How can I give you a bounty for it ? Do I have to "start a bounty"?
    – sinekonata
    Apr 20, 2014 at 3:06
  • We should edit your answer for this reason : the type should be set to Link instead of Application. And therefore replace Exec=... with URL=file:///home/manuel
    – sinekonata
    Apr 21, 2014 at 5:49
  • Awesome I kept thinking there should be a better type for the desktop file. I'll double check how that works and edit that in, thank you :)
    – Mateo
    Apr 21, 2014 at 12:28

No, that is not possible. Other operating systems cannot read the custom icons set on a folder by Nautilus or other file managers in Ubuntu. Also, the metadata system is detached from nautilus itself, so the setting for the custom icon is separate from the folder itself.

  • That is not what I meant, I meant is there an equivalent way for nautilus or, say, nemo to remember a folder's icon on other drives? Or could I achieve that through copy pasting the thumbnails stored somewhere?
    – sinekonata
    Apr 19, 2014 at 20:47
  • 1
    Then edit your question, because it's unclear what you mean. Reading your question it sounds like you want to change the icon of a folder on a drive, and have that icon show up when you plug the drive into a different computer.
    – dobey
    Apr 19, 2014 at 20:51
  • let us continue this discussion in chat
    – sinekonata
    Apr 20, 2014 at 2:31
  • I see now what you meant. By "other machine" I didn't mean other OS, it meant another drive or another machine with the same file manager. Also I noticed so and I was precisely looking for that metadata you speak of, do you know where it is?
    – sinekonata
    Apr 20, 2014 at 3:19

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.