Record: integrated icons were invisible to GNOME

Outcome

None of the AppImages integrated by this tool showed an icon. The icons were on disk and resolved by this project’s own locator, but GTK never looked at them, because a stale icon theme cache made it skip the directory scan entirely. Every install now refreshes that cache.

Root Cause

GTK loads an icon theme directory only through its cache when that cache looks current. In gtk/gtkiconcache.c, gtk_icon_cache_new_for_path() decides:

if (st.st_mtime < path_st.st_mtime)
      goto done;              /* cache outdated, so fall back to scanning */
    ... use the cache ...

and the caller in gtk/gtkicontheme.c does:

dir_mtime->cache = gtk_icon_cache_new_for_path (dir);
    if (dir_mtime->cache != NULL)
      continue;               /* cached: never open the directory */
    gdir = g_dir_open (dir, 0, NULL);

The cache is keyed to the theme root (~/.local/share/icons/hicolor), not to the size directories. On this host:

Item Time
~/.local/share/icons/hicolor directory 2026-09-21 14:05:48.000
~/.local/share/icons/hicolor/icon-theme.cache 2026-09-21 14:05:48.715
the icons themselves, written into 64x64/apps, scalable/apps, … 2026-09-22

Adding files to a subdirectory changes that subdirectory’s mtime, not the theme root’s, so the cache stayed newer than the theme root and GTK kept using it. The cache contained no appimage_ name, and GTK never rescanned, so every icon this tool installed was invisible to GNOME.

Fix

Secondary Fix: Invalid Size Directory

The NETGEAR AppImage ships an icon under a size directory literally named 0x0, which no theme lists, so that icon could never resolve. Such a directory is now remapped to 256x256 on install. The icon already on this host was moved to 256x256/apps and its manifest entry was updated.

Verification

Note

GNOME Shell keeps icon themes in memory and watches the theme directories, so the icons should appear without a restart. If they do not, logging out and back in clears the shell’s in-memory theme.

Commits