How to find all programs associated with a MIME type? One could look for the MIME type
in the default, system-wide directory. For example, for application/pdf
,
grep -ls application/pdf /usr/share/applications/*
lists all the program files in /usr/share/applications
that are associated
with application/pdf
.
But that would overlook other directories, specially user-level directories.
Isn't there a command similar to
xdg-mime query default application/pdf
to list all associated programs, not only the default one?
Here's a short Python program for that:
Save that in a file, e.g.
/usr/local/bin/mimeapps
. Then you can use it like