Ubuntu: Cannot change icon for a filetype


I am trying to change the icon for .py file.

I referred:





Still no success in changing the icon of python scripts. They remain like gedit icons.

enter image description here


As this Ubuntu wiki says:

The file manager creates thumbnails to preview image and video files, and can also preview text files and sound files......The icon for plain text files looks like a piece of paper with text inside. The file manager automatically extracts the first few lines of text from the file and shows it in the icon. You can turn this feature on or off, or turn it on only for files on your computer and local external drives.

To turn off the feature:

  • Open nautilus and go to Edit -> Preferences.

  • Go to the Previews tab and under the Text Files section, select the menu for Show text in icons and select Never.

  • Close the Preferences.

Nautilus Preferences

Now, we come to changing icons.

I've Faenza Icon Theme installed, so I go to /usr/share/icons/Faenza/mimetypes/scalable and there is already an icon file named text-x-python.svg, and the same shows for all the .py files.

If you've any icon theme installed you should go to the directory for that theme and make the changes, if not you should change the icons in the /usr/share/icons/gnome directory.

Additional Links: You can read more about File Manager Preferences here: https://help.ubuntu.com/11.04/ubuntu-help/nautilus-prefs.html.

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Next Post »