I'm using Linux Mint 17.2 MATE
I have a problem assigning an icon for custom (newly created) file type.
My task:
To set new double-click action and new icon for *.session files.
My sequence of operations:
xdg-mime install --novendor scite_session.xml
xdg-icon-resource install --context mimetypes --size 48 text-x-session.png text-x-session
xdg-desktop-menu install --novendor scite_session.desktop
xdg-mime default scite_session.desktop text/x-session
No errors have been displayed during these steps.
Finally I've rebooted OS.
My files (used in the above steps):
text-x-session.png
48x48 PNG image file
scite_session.xml
<?xml version="1.0" encoding="utf-8"?>
<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">
<mime-type type="text/x-session">
<comment>SciTE session file</comment>
<sub-class-of type="text/plain"/>
<glob pattern="*.session"/>
<icon name="text-x-session"/>
</mime-type>
</mime-info>
scite_session.desktop
[Desktop Entry]
Encoding=UTF-8
Version=1.0
Name=SciTE (session)
Comment=Loading SciTE session
GenericName=Text Editor
Type=Application
Exec=SciTE -loadsession:%f
Icon=Sci48M
Terminal=false
Categories=
StartupNotify=true
MimeType=text/x-session;
My results:
Everything seems to be OK except icons.
- I see proper type "text/x-session" in "properties" page of any *.session file
- Double-clicking on any *.session file invokes proper action according to "scite_session.desktop"
- But the icon used by caja for *.session files is still the same instead of my new icon.
My question:
How to set new icon for mimetype in Linux Mint?
I've noticed that xdg-icon-resource
created a copy of my .png in ~/.local/share/icons/hicolor/48x48/mimetypes
Probably, I should copy it manually somewhere else?
gtk-update-icon-cache
and/etc/mime.types
.