0

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.

sinekonata
  • 572
  • 7
  • 23

2 Answers2

3

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]
    Type=Link
    Terminal=false
    Icon=/home/mateo/Documents/.new/.icon.png
    Name=Folder
    URL=file:///home/mateo/Documents/.new
    

    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 ;)

Mateo
  • 8,152
1

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.

dobey
  • 41,650