Flatpak and icon themes

I noticed that the programs I installed with Flatpak do not use the right cursor theme, so my initial solution was to copy the Adwaita icon theme from /nix/store to ~/.icons which worked.

But I found out that the icons themes get symlinked to /run/current-system/sw/share/icons so I symlinked it to ~/.icons:

lrwxrwxrwx 1 broccoli users 35 14. led 23.10 .icons -> /run/current-system/sw/share/icons/

However this does not work, and I suspect that it is because the actual icon theme is owned by the root, can I chown it for my user, will I break anything? Or can I just change the owner group to users instead?

No, it’s because if flatpacks security model, which forbids reads outside of its sandbox, and the nix store, or some intermediate link is probably not readable for the flatpack.

Per https://tesk.page/2022/09/28/what-not-to-recommend-to-flatpak-users, ~/.icons is incorrect, and ~/.local/share/icons should be used instead.

Either way, this should no longer be necessary thanks to nixos/flatpak: pass system icons and fonts by io12 · Pull Request #262462 · NixOS/nixpkgs · GitHub

Hm, sadly, in the steam flatpak, I still see the xlib cursor, and fontconfig isn’t respected

Looks like the cursor issue was addressed by starting gsd-xsettings manually :thinking: