The desktop icon system identifies icons by name. Depending on the required size, the choice of icon theme and the context in which the icon is used, the desktop icon system locates an appropriate icon resource to depict an icon. Icon resources can be XPM files or PNG files.
The desktop icon system works according to the XDG Icon Theme Specification at m[blue]http://www.freedesktop.org/wiki/Specifications/icon-theme-specm
A vendor prefix consists of alpha characters ([a-zA-Z]) and is terminated with a dash ("-"). Companies and organizations are encouraged to use a word or phrase, preferably the organizations name, for which they hold a trademark as their vendor prefix. The purpose of the vendor prefix is to prevent name conflicts.
The default is to use system mode when called by root and to use user mode when called by a non-root user.
xdg-icon-resource honours the following environment variables:
An exit code of 0 indicates success while a non-zero exit code indicates failure. The following failure codes can be returned:
xdg-desktop-icon(1), xdg-desktop-menu(1), xdg-mime(1), m[blue]Icon theme specificationm
To install an icon resource to depict a launcher for the application myfoobar, the company ShinyThings Inc. can use:
xdg-icon-resource install --size 64 shinythings-myfoobar.png
To install an icon for a new application/x-foobar file type one can use:
xdg-icon-resource install --context mimetypes --size 48 ./mime-foobar-48.png application-x-foobar xdg-icon-resource install --context mimetypes --size 64 ./mime-foobar-64.png application-x-foobar
This will install two icons with the name application-x-foobar but with different sizes.
Copyright © 2006