When I have no defaults.list and mimeapps.list, xdg-open opens text/plain with gvim. But when I create defaults.list in /usr/share/applications/ and add the following lines :[Default Applications]text/plain=emacs.desktopit opens text files with firefox.However, if I move /usr/share/applications/defaults.list to ~/.local/share/applications/mimeapps.list, it opens text files with emacs as expected.My questions:How does xdg-open determine which application to launch when there is no defaults.list and mimeapps.list?Why is xdg-open using firefox when I simply write /usr/share/applications/defaults.list?I am using Arch linux.
xdg-open default applications behavior
arch linux;freedesktop;defaults