/etc/xdg/mimeapps.list being ignored

This seems to have been happening since Debian 12.

In spite of fourteen lines in /etc/xdg/mimeapps.list explicitly setting a different preferred app for image files, and that file being present on my debian 12 based qube, I get fricking ImageMagick when I open image files. [It won’t do slideshows, and (unforgivable) if I resize the window it distorts the image then wants me to save the distorted image. (And ctrl-drag and shift-drag don’t work…just in case someone wants to suggest that. Nor should I have to do that anyway.) Who wrote this piece of junk?]

It was working, now all of the sudden these lines are ignored. Something, somewhere is overriding my settings. Given that ImageMagick is tied to a lot of qubes features (for the love of God why?) to the point where I was strongly urged to not uninstall the damn thing, I suspect some change to something somewhere in the qubes code base, or perhaps some hard setting when debian-12-minimal was created, led to my being unable to override this.

The qube is a named disposable used for viewing (not editing) photgraphic images.

xdg-mime query default <somefilename>.jpg returns image/jpeg

xdg-mime query default image/jpeg returns display-im6.q16.desktop in spite of an entry in /etc/xdg/mimeapps.list setting the app differently.

So is something in the debian 12 minimal template overriding mimeapps settings?

I had an issue with mine recently in debian-12 app VMs. I found there is a system default here:

/usr/share/applications/mimeapps.list

And this will also be overridden if you have this:

~/.config/mimeapps.list

1 Like

Thanks for the reply.

Unfortunately /usr/share/applications/mimeapps.list doesn’t exist on the VM in question. Nor is there any other copy of mimeapps.list anywhere on that template (I did a find from / to check that).

Nevertheless I tried simply copying my mimeapps.list to ~/.config to see if that would make a difference. After making sure it’s actually in effect when the disposable starts, I am still seeing GDF ImageMagick as the default action for jpegs.

OK.

What appears to have happened is either: mime iin debian 12 is stricter about full names of desktop files or my preferred app changed the name of its desktop file. (I can’t tell which of these it was without rebuilding the debian-11 template for the vm, and that would be a significant amount of work.)

Once I put the full name (org.xfce.ristretto.desktop) instead of ristretto.desktop in my mime file, it started working properly.