$ xdg-mime query filetype <path-to-file>
<mime/type>
$ xdg-mime query default <mime/type>
<someapp.desktop>
Find your app in /usr/share/application
xdg-mime default <someotherapp.desktop> <mime/type>
$ xdg-mime query filetype <path-to-file>
<mime/type>
$ xdg-mime query default <mime/type>
<someapp.desktop>
Find your app in /usr/share/application
xdg-mime default <someotherapp.desktop> <mime/type>