How to add file icon

When we create programming file like
ea42b3bc4e078052e722d814c27a84742879d325.png

778acc269eaf914cb516b426d604e6222962c03f.png

it will create a file with icon that is related to particular programming language . like this how to add file icon to the system for other programming languages which do not show file icon .

can any one help me find the file locations were this icons are Situated so that i can copy and past file icons or help me to add more file icons

Its based on activated icons theme .

example for python file mime type.

3 Likes

You can add custom MIME types, or override system defaults with the following:

tee custom-mime.xml << "EOF" > /dev/null
<?xml version="1.0" encoding="utf-8"?>
<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">
<mime-type type="text/x-python">
<generic-icon name="text-html"/>
</mime-type>
</mime-info>
EOF
sudo xdg-mime install --mode system custom-mime.xml

The MIME packages are stored here:

/usr/share/mime/packages
~/.local/share/mime/packages

Unpackaged icons should be stored to:

/usr/local/share/icons
~/.local/share/icons
1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.