Is there any way to force Firefox to use system-wide defaults, i.e. xdg-open for opening all types of files?
Open the Firefox menu (Click 3 horizontal bars in the Firefox menu), then click the Preferences icon. In the sidebar that appears on the left, select Applications.
If the file you are trying to open is listed there, select Always ask from the drop-down to the right of the file type. The next time you try to open the file you will be prompted for how you want the file handled. Select the correct application to use, then select Always use this program to force it in the future. If you accidentally select an application that doesn't work for the file, repeat these steps until you select a program that works with your file.
Remember, Linux uses magic numbers to determine the file type while Windows uses the file's extension. If the extension or magic number can not be used to determine the file type, you will be asked each time you attempt to open the file since Firefox will be unable to determine the correct file type.
I'm not sure if this is a case of X/Y Problem, but to give you an alternative solution, here it is.
I came across this question when researching for a way to make
Dolphin instead of
Edit the file
~/.config/mimeapps.list and find all lines with
inode/directory= and let there be only
Thunar from de list.
I hope this help more people dropping here from a similar search.