gtk-update-icon-cache-3.0
Update GTK+ icon theme cache
SYNOPSIS
gtk-update-icon-cache-3.0 [-f] [-n] [-t] [-v] path...
PARAMETERS
-f
Force refresh. Forces the generation of the cache even if it appears up-to-date.
-n
No hardlinks. Do not create hard links in the cache.
-t
Do textual cache. Use a textual cache format instead of a binary one.
-v
Verbose output. Prints more information about the cache generation process.
path...
The directory paths to the icon themes to update the cache for. If no path is given, the current directory is used.
DESCRIPTION
The gtk-update-icon-cache
command creates a cache file for GTK+ theme icons. This cache is used by GTK+ applications to quickly locate and load icons, improving application startup time and reducing disk I/O. When a theme's icons are modified (added, removed, or updated), running this command regenerates the cache, ensuring that applications reflect the latest icon changes. It's generally triggered automatically by package managers after updating icon themes. Running without parameters uses the current directory for theme path. The command examines the icon theme directory specified and creates or updates a cache file named 'icon-cache.cache' located in the theme's directory. This cache file is then used by GTK+ applications to quickly locate icons within the theme, improving application performance. Incorrectly configured icon themes can cause applications to display missing icons or use the wrong ones. The command should be run as root or a user with write access to the theme directories. It uses the GTK+ version specified in the command name, such as 'gtk-update-icon-cache-3.0' for GTK+ 3.0.
CAVEATS
- Requires write access to the icon theme directory.
- Running this command unnecessarily can waste resources. It is generally only needed after icon theme updates.
- Icon themes without a valid
index.theme
file may not be processed correctly.
<B>ICON THEME STRUCTURE</B>
Icon themes usually follow a specific directory structure. They contain an index.theme
file which describes the theme, and subdirectories for different icon sizes and contexts (e.g., scalable
, 16x16
, actions
, status
). The gtk-update-icon-cache
command parses this structure to generate the cache.
<B>TROUBLESHOOTING</B>
If applications are not displaying updated icons after an icon theme update, try running gtk-update-icon-cache
with the -f
option (force refresh). Also, verify that the icon theme's index.theme
file is correctly formatted and that the necessary icons are present in the appropriate subdirectories.
HISTORY
The gtk-update-icon-cache
command was introduced as part of the GTK+ toolkit to improve icon loading performance. The -3.0 version specifically targets GTK+ version 3.0. It is typically run as part of a package installation/update process for icon themes, ensuring that applications use the most recent set of available icons. The command has evolved with GTK+, adding options for controlling the cache creation process and providing more detailed output.