Why does xdg-open use Firefox rather than the default app according to xdg-mime

xdg-open

$ xdg-mime query filetype my-time-sheet.ods 
application/vnd.oasis.opendocument.spreadsheet

$ xdg-mime query default application/vnd.oasis.opendocument.spreadsheet
calc.desktop calc.desktop

$ xdg-open my-time-sheet.ods 

One would expect that the last command would open calc.desktop, but instead the file path is opened in Firefox. Why is this?

Best Answer

calc.desktop calc.desktop

If it is set correctly, "calc.desktop" is displayed only once.
This is repaired by re-setting.

xdg-mime default calc.desktop application/vnd.oasis.opendocument.spreadsheet
# (or edit ~/.local/share/applications/mimeapps.list)
Related Question