xdg-icon-resource — command line tool for (un)installing icon resources
xdg-icon-resource
install [--noupdate
] [--novendor
] [--theme
] [theme
--context
] [context
--mode
] mode
--size
size
icon-file
[icon-name
]
xdg-icon-resource
uninstall [--noupdate
] [--theme
] [theme
--context
] [context
--mode
] mode
--size
size
icon-name
xdg-icon-resource
forceupdate [--theme
] [theme
--mode
]mode
xdg-icon-resource
{ --help
| --manual
| --version
}
The xdg-icon-resource program can be used to install icon resources into the desktop icon system in order to illustrate menu entries, to depict desktop icons or to graphically represent file types.
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 http://www.freedesktop.org/wiki/Specifications/icon-theme-spec
icon-file
to the desktop icon system under the name
icon-name
.
Icon names do not have an extension.
If icon-name
is not provided the name is
derived from icon-file
.
The icon file must have
.png or .xpm
as extension. If a corresponding .icon
file exists in the same location as icon-file
it will be installed as well.
icon-name
from the desktop icon system. Note that icon names do not have
an extension.
--noupdate
option.
--noupdate
--novendor
Normally, xdg-icon-resource checks to ensure that an icon file to be installed in the apps context has a proper vendor prefix. This option can be used to disable that check.
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.
--theme
theme
theme
. If no theme is specified the
icons will be installed as part of the default hicolor theme.
Applications may install icons under multiple themes but should
at least install icons for the default hicolor theme.
--context
context
--size
size
--mode
mode
mode
can be
user or system.
In user mode the file is (un)installed for the current user
only. In system mode the file is (un)installed for all users
on the system. Usually only root is allowed to install in
system mode.
The default is to use system mode when called by root and to use user mode when called by a non-root user.
--help
--manual
--version
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:
1
2
3
4
5
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.