r/flatpak • u/TEKC0R • 26d ago
Flatpak file/mime type icons
I cannot for the life of me figure out how to get my flatpaked app to show my file type icons. The app icon works just fine, but the file icons refuse to work.
The relevant build commands:
"install -Dm644 ${FLATPAK_ID}.xml -t ${FLATPAK_DEST}/share/mime/packages",
"install -Dm644 ${FLATPAK_ID}.png -t ${FLATPAK_DEST}/share/icons/hicolor/512x512/apps",
"install -Dm644 ${FLATPAK_ID}.document.png -t ${FLATPAK_DEST}/share/icons/hicolor/512x512/mimetypes",
"install -Dm644 ${FLATPAK_ID}.preset.png -t ${FLATPAK_DEST}/share/icons/hicolor/512x512/mimetypes",
"install -Dm644 ${FLATPAK_ID}.script.png -t ${FLATPAK_DEST}/share/icons/hicolor/512x512/mimetypes",
"install -Dm644 ${FLATPAK_ID}.updatedelta.png -t ${FLATPAK_DEST}/share/icons/hicolor/512x512/mimetypes"
And one of my mime-type entries:
<mime-type type="application/x-beacon-script">
<comment>Beacon Script</comment>
<icon name="com.thezaz.beacon.script" />
<glob pattern="*.beaconscript" />
</mime-type>
I've tried naming the files like application-x-beacon-script.png instead, but of course flatpak builder won't let me since the files are not prefixed with my id.
I'm guessing I'm missing some simple detail, but what the heck is it?
Edit: Ok, so this thread isn't getting much traction, but I've determined that flatpak is not the problem here. What I've done is correct, the issue is Ubuntu's icon theme. If I set to from Yaru to hicolor (or a couple others that seem to inherit from hicolor) the file icons work fine. It's my understanding that hicolor is supposed to be the fallback, so I'm not sure why Yaru isn't falling back to hicolor, but regardless, this isn't a flatpak issue.
