Is there a home directory location for overriding icons?

The historical equivalent is ~/.icons, the XDG equivalent is ~/.local/share/icons (strictly speaking, icons subdirectories of the paths in $XDG_DATA_DIRS). When you specify an icon by name only in a .desktop file, that relies on icon themes, so it’s worth reading the icon theme spec.

Ideally you should use xdg-icon-resource to install icons locally.


The xdg-icon-resource program is apparently stupid about "scalable" SVG icons. It requires a --size argument but does not let you specify scalable as the size.

I was trying to get the Alacritty icon to work and here is what did it:

$ mkdir -p ~/.local/share/icons/hicolor/scalable/apps
$ mv /tmp/Alacritty.svg ~/.local/share/icons/hicolor/scalable/apps/

To explain a bit, the "hicolor" theme is the fallback, default parent of most all Gnome themes. You can see its definitions in /usr/share/icons/hicolor/index.theme

You can find your current theme with

$ gsettings get org.gnome.desktop.interface icon-theme
'Yaru'

And you can see how it inherits from hicolor right at the top:

$ head -4 /usr/share/icons/Yaru/index.theme
[Icon Theme]
Name=Yaru
Comment=A desktop adaptation of the Ubuntu mobile icons.
Inherits=Humanity,hicolor

If you are trying to override the icon for a specific theme then you need to put the icon into the directory for that theme because putting it into hicolor would not override it for Yaru, for example.