How can I get a list of applications that can open a specific type of file / MIME type? I am looking for a desktop independent Linux solution.
I found an opportunity to get the MIME type for a file .:
~> xdg-mime query filetype test.svg image/svg+xml
Then I could request a default application for this MIME type .:
~> xdg-mime query default image/svg+xml eog.desktop
Is there a solution for getting a list of programs (not the default) that I can use for this file?
For example, on the GNOME desktop, if I select open with another application for the *.json file, I can see three applications (Atom, Gedit, Builder) recommended for opening the file .:

If I choose, show all applications, I can also see the following related application (LibreOffice Writer) .:

I found the file /home/user/.config/mimeapps.list , which has content such as:
[Added Associations] text/html=atom.desktop;firefox.desktop;midori.desktop;org.gnome.gedit.desktop;brackets.desktop; application/javascript=atom.desktop;org.gnome.Builder.desktop;org.gnome.gedit.desktop;
and also has related applications for the mime type, but I cannot find the global mimeapps.list file, which is mentioned in the Arch Linux wiki .
source share