Flatpak installation hijacks hicolor icon theme icons
While investigating evolution#1698 (closed) I realized, if I'm not mistaken, that all icons in /usr/share/icons/hicolor
are ignored, when there is installed flatpak. At least according to my testing, when the fallback icon theme named hicolor
is loaded, it knows of these paths here:
insert_theme: 0xce51c0: path[0]: '/home/mcrha/.local/share/icons/hicolor'
insert_theme: 0xce51c0: path[1]: '/home/mcrha/.icons/hicolor'
insert_theme: 0xce51c0: path[2]: '/build/local/share/icons/hicolor'
insert_theme: 0xce51c0: path[3]: '/home/mcrha/.local/share/flatpak/exports/share/icons/hicolor'
insert_theme: 0xce51c0: path[4]: '/var/lib/flatpak/exports/share/icons/hicolor'
insert_theme: 0xce51c0: path[5]: '/usr/local/share/icons/hicolor'
insert_theme: 0xce51c0: path[6]: '/usr/share/icons/hicolor'
insert_theme: 0xce51c0: path[7]: '/build/local/share/pixmaps/hicolor'
insert_theme: 0xce51c0: path[8]: '/home/mcrha/.local/share/flatpak/exports/share/pixmaps/hicolor'
insert_theme: 0xce51c0: path[9]: '/var/lib/flatpak/exports/share/pixmaps/hicolor'
insert_theme: 0xce51c0: path[10]: '/usr/local/share/pixmaps/hicolor'
insert_theme: 0xce51c0: path[11]: '/usr/share/pixmaps/hicolor'
then there is checked, which directory contains an index.theme
file and the first in the list wins, thus for me:
insert_theme: 0xce51c0: path[0]: no such file '/home/mcrha/.local/share/icons/hicolor/index.theme'
insert_theme: 0xce51c0: path[1]: no such file '/home/mcrha/.icons/hicolor/index.theme'
insert_theme: 0xce51c0: path[2]: no such file '/build/local/share/icons/hicolor/index.theme'
insert_theme: 0xce51c0: path[3]: has file '/home/mcrha/.local/share/flatpak/exports/share/icons/hicolor/index.theme'
and no other directory is considered. This can be fine for the real themes, but the fallback theme should load all icons from all directories, not only from the first, which is in whatever order.
I also need to load icons from an application private directory (see evolution#1698 (closed) for more information), but only as the last fallback of the fallback, aka when nothing else provides the icons.