Flatpak GTK apps cannot show pictures.
(name . bug-guix@gnu.org)(address . bug-guix@gnu.org)
# Main issue
Solanum in flatpak failed to render its logo.
# Reproduce step
Run
```
guix shell flatpak
flatpak install org.gnome.Solanum
flatpak run org.gnome.Solanum
```
# Investigation
The issue maybe caused by missing gdk pixbuf loaders. Try `flatpak run
--command=sh --devel org.gnome.Solanum` enter the debug shell of flatpak
and run `strace -o s.log solanum`. Found something like
```
openat(AT_FDCWD, "/run/current-system/profile/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache",
O_RDONLY) = -1 ENOENT (?????????)
...
access("/run/current-system/profile/share/themes/Adwaita/gtk-4.6/gtk.css", F_OK) = -1 ENOENT (?????????)
access("/run/current-system/profile/share/themes/Adwaita/gtk-4.4/gtk.css", F_OK) = -1 ENOENT (?????????)
access("/run/current-system/profile/share/themes/Adwaita/gtk-4.2/gtk.css", F_OK) = -1 ENOENT (?????????)
access("/run/current-system/profile/share/themes/Adwaita/gtk-4.0/gtk.css", F_OK) = -1 ENOENT (?????????)
...
openat(AT_FDCWD, "/run/current-system/profile/lib/gio/modules", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (?????????)
```
It shows that flatpak is trying to load GTK related resource from
/run/current-system/profile. And use
```
flatpak run --filesystem=/gnu/store:ro --filesystem=/run/current-system:ro org.gnome.Solanum
```
It works well.
# Related links
The solution of Nixpkgs is add these path and store to the flatpak
sandbox. I'm not sure whether it's good or not. Because user may want to
setup its own GUIX{2,3,4}_GTK_PATH and GDK_PIXBUF_LOADER_FILES.
--
Retrieve my PGP public key:
gpg --recv-keys D47A9C8B2AE3905B563D9135BE42B352A9F6821F
Zihao
-----BEGIN PGP SIGNATURE-----
iIsEARYIADMWIQRefA5qkqvnKdl/GTlmOX+E92aT+QUCYk++nRUcYWxsX2J1dF9s
YXN0QDE2My5jb20ACgkQZjl/hPdmk/nCNQD/RKCEnxBhBviVzTzc3rVQHwq81HIW
KwDiiltANKqpZ9gA/iyU5Tas2p/U4dRDf7ARPAwsTcIPIm22539DSrZ0QuMN
=p2Yu
-----END PGP SIGNATURE-----