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

   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

   The desktop icon system works according to the XDG Icon Theme
   Specification at


       Installs the icon file indicated by 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.

       Removes the icon indicated by icon-name from the desktop icon
       system. Note that icon names do not have an extension.

       Force an update of the desktop icon system. This is only useful if
       the last call to xdg-icon-resource included the --noupdate option.


       Postpone updating the desktop icon system. If multiple icons are
       added in sequence this flag can be used to indicate that additional
       changes will follow and that it is not necessary to update the
       desktop icon system right away.

       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
       Installs or removes the icon file as part of 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
       Specifies the context for the icon. Icons to be used in the
       application menu and as desktop icon should use apps as context
       which is the default context. Icons to be used as file icons should
       use mimetypes as context. Other common contexts are actions,
       devices, emblems, filesystems and stock.

   --size size
       Specifies the size of the icon. All icons must be square. Common
       sizes for icons in the apps context are: 16, 22, 32, 48, 64 and
       128. Common sizes for icons in the mimetypes context are: 16, 22,
       32, 48, 64 and 128

   --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.

       Show command synopsis.

       Show this manual page.

       Show the xdg-utils version information.


   xdg-icon-resource honours the following environment variables:

       Setting this environment variable to a non-zero numerical value
       makes xdg-icon-resource do more verbose reporting on stderr.
       Setting a higher value increases the verbosity.

       This environment variable can be used by the user or administrator
       to override the installation mode. Valid values are user and


   An exit code of 0 indicates success while a non-zero exit code
   indicates failure. The following failure codes can be returned:

       Error in command line syntax.

       One of the files passed on the command line did not exist.

       A required tool could not be found.

       The action failed.

       No permission to read one of the files passed on the command line.


   xdg-desktop-icon(1), xdg-desktop-menu(1), xdg-mime(1), Icon theme


   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

       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.


   Kevin Krammer

   Jeremy White


   Copyright  2006


    1. Icon theme specification


Personal Opportunity - Free software gives you access to billions of dollars of software at no cost. Use this software for your business, personal use or to develop a profitable skill. Access to source code provides access to a level of capabilities/information that companies protect though copyrights. Open source is a core component of the Internet and it is available to you. Leverage the billions of dollars in resources and capabilities to build a career, establish a business or change the world. The potential is endless for those who understand the opportunity.

Business Opportunity - Goldman Sachs, IBM and countless large corporations are leveraging open source to reduce costs, develop products and increase their bottom lines. Learn what these companies know about open source and how open source can give you the advantage.

Free Software

Free Software provides computer programs and capabilities at no cost but more importantly, it provides the freedom to run, edit, contribute to, and share the software. The importance of free software is a matter of access, not price. Software at no cost is a benefit but ownership rights to the software and source code is far more significant.

Free Office Software - The Libre Office suite provides top desktop productivity tools for free. This includes, a word processor, spreadsheet, presentation engine, drawing and flowcharting, database and math applications. Libre Office is available for Linux or Windows.

Free Books

The Free Books Library is a collection of thousands of the most popular public domain books in an online readable format. The collection includes great classical literature and more recent works where the U.S. copyright has expired. These books are yours to read and use without restrictions.

Source Code - Want to change a program or know how it works? Open Source provides the source code for its programs so that anyone can use, modify or learn how to write those programs themselves. Visit the GNU source code repositories to download the source.


Study at Harvard, Stanford or MIT - Open edX provides free online courses from Harvard, MIT, Columbia, UC Berkeley and other top Universities. Hundreds of courses for almost all major subjects and course levels. Open edx also offers some paid courses and selected certifications.

Linux Manual Pages - A man or manual page is a form of software documentation found on Linux/Unix operating systems. Topics covered include computer programs (including library and system calls), formal standards and conventions, and even abstract concepts.