Based on this post I’ve created an appimage-run
desktop item and assigned it the relevant MIME types, but I’m unsure how to test it properly. I tried to simply xdg-open ${sample-appImage}
, but that doesn’t seem to know about the desktop item MIME type association:
xdg-open: no method available for opening ‘/nix/store/il5f52xapdvyb11nbb5wxxhzb7axfl4s-appimagetool-x86_64.AppImage’
xdg-mime query filetype /nix/store/il5f52xapdvyb11nbb5wxxhzb7axfl4s-appimagetool-x86_64.AppImage
prints “application/vnd.appimage”, so it already knows about the MIME type, but somehow doesn’t associate it with the desktop item yet.
How should I set the desktop item as the default for those MIME types? Is that automagic when $out
includes desktop items? I can’t seem to find any code related to this in other packages, makeDesktopItem
, or buildFHSUserEnv
.
I’ve tried creating ~/.config/mimeapps.list
and running update-mime-database ~/.config
in the test, but it doesn’t seem to work. mimeopen --database=$HOME/.config ${sample-appImage}
still complains that I need to run update-mime-database
, and xdg-open ${sample-appImage}
still fails in the same way.