I think I’ve found the cause of the missing icons. I decided to compare the yuzu
snap (a snap I currently maintain) which uses the desktop-qt5 helper, with dolphin-emulator
using the kde-neon
extension (with qgnomeplatform included). The difference I identified was in the gdk-pixbuf-loaders.cache file in XDG_CACHE_HOME. dolphin-emulator
was missing these lines:
"/snap/yuzu/54/usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-svg.so"
"svg" 6 "gdk-pixbuf" "Scalable Vector Graphics" "LGPL"
"image/svg+xml" "image/svg" "image/svg-xml" "image/vnd.adobe.svg+xml" "text/xml-svg" "image/svg+xml-compressed" ""
"svg" "svgz" "svg.gz" ""
" <svg" "* " 100
" <!DOCTYPE svg" "* " 100
I added this block to dolphin-emulator
's version of the file (changing the path to /snap/dolphin-emulator/x2/usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-svg.so
), which had the result of rendering the missing icons. I have confirmed this also works with the qt5-gtk-platformtheme
package included instead of qgnomeplatform
.
I’ve tried to investigate further by looking at the desktop-launch
script from the kde-neon
extension to figure out how the file was getting created. This is the logic responsible for creating the file
export GDK_PIXBUF_MODULE_FILE="$XDG_CACHE_HOME/gdk-pixbuf-loaders.cache"
export GDK_PIXBUF_MODULEDIR="$SNAP_DESKTOP_RUNTIME/usr/lib/$ARCH/gdk-pixbuf-2.0/2.10.0/loaders"
if [ "$needs_update" = true ] || [ ! -f "$GDK_PIXBUF_MODULE_FILE" ]; then
rm -f "$GDK_PIXBUF_MODULE_FILE"
if [ -f "$SNAP_DESKTOP_RUNTIME/usr/lib/$ARCH/gdk-pixbuf-2.0/gdk-pixbuf-query-loaders" ]; then
async_exec "$SNAP_DESKTOP_RUNTIME/usr/lib/$ARCH/gdk-pixbuf-2.0/gdk-pixbuf-query-loaders" > "$GDK_PIXBUF_MODULE_FILE"
fi
fi
Where SNAP_DESKTOP_RUNTIME=$SNAP/kf5 (entry point for the kde-frameworks-5-core18
content snap). Running the /snap/kde-frameworks-5-core18/current/usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/gdk-pixbuf-query-loaders
binary did generate the file with the SVG block present, but when I execute the same command after I run snap run --shell dolphin-emulator.dolphin-emu
the SVG block is not present. This is the diff
between these two files:
5c5
< # LoaderDir = /snap/dolphin-emulator/x2/kf5/usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders
---
> # LoaderDir = /usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders
7c7,14
< "/snap/dolphin-emulator/x2/kf5/usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-ani.so"
---
> "/usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders/io-wmf.so"
> "wmf" 0 "gdk-pixbuf" "Windows Metafile" ""
> "image/x-wmf" ""
> "wmf" "apm" ""
> "\327\315\306\232" "" 100
> "\001" "" 100
>
> "/usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-ani.so"
13c20
< "/snap/dolphin-emulator/x2/kf5/usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-bmp.so"
---
> "/usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-bmp.so"
19c26
< "/snap/dolphin-emulator/x2/kf5/usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-gif.so"
---
> "/usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-gif.so"
25c32
< "/snap/dolphin-emulator/x2/kf5/usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-icns.so"
---
> "/usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-icns.so"
31c38
< "/snap/dolphin-emulator/x2/kf5/usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-ico.so"
---
> "/usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-ico.so"
38c45
< "/snap/dolphin-emulator/x2/kf5/usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-jpeg.so"
---
> "/usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-jpeg.so"
44c51
< "/snap/dolphin-emulator/x2/kf5/usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-png.so"
---
> "/usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-png.so"
50c57
< "/snap/dolphin-emulator/x2/kf5/usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-pnm.so"
---
> "/usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-pnm.so"
61c68
< "/snap/dolphin-emulator/x2/kf5/usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-qtif.so"
---
> "/usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-qtif.so"
68c75,82
< "/snap/dolphin-emulator/x2/kf5/usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-tga.so"
---
> "/usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-svg.so"
> "svg" 6 "gdk-pixbuf" "Scalable Vector Graphics" "LGPL"
> "image/svg+xml" "image/svg" "image/svg-xml" "image/vnd.adobe.svg+xml" "text/xml-svg" "image/svg+xml-compressed" ""
> "svg" "svgz" "svg.gz" ""
> " <svg" "* " 100
> " <!DOCTYPE svg" "* " 100
>
> "/usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-tga.so"
79c93
< "/snap/dolphin-emulator/x2/kf5/usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-tiff.so"
---
> "/usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-tiff.so"
87c101
< "/snap/dolphin-emulator/x2/kf5/usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-xbm.so"
---
> "/usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-xbm.so"
94c108
< "/snap/dolphin-emulator/x2/kf5/usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-xpm.so"
---
> "/usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-xpm.so"
I’m not sure what causes the difference in output between my host machine and the snap container, I’m assuming this is a problem with the content snap itself? Hopefully this is helpful in figuring out the solution.
UPDATE: I listed the contents of the modules present in the loaders directory of the kde-frameworks-5-core18
snap and can confirm the SVG module is not present (the same is also true for the kde-frameworks-5-qt-5-14-core18
snap)
$ ls /snap/kde-frameworks-5-core18/current/usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders/
libpixbufloader-ani.so libpixbufloader-ico.so libpixbufloader-qtif.so libpixbufloader-xpm.so
libpixbufloader-bmp.so libpixbufloader-jpeg.so libpixbufloader-tga.so
libpixbufloader-gif.so libpixbufloader-png.so libpixbufloader-tiff.so
libpixbufloader-icns.so libpixbufloader-pnm.so libpixbufloader-xbm.so
I believe the librsvg2-2
package is responsible for this module, would it just be a case of bundling this into the content snap if it’s not already present?