Você pode usar a opção mimeopen
with -d
:
man mimeopen
:
DESCRIPTION
This script tries to determine the mimetype of a file and open it with
the default desktop application. If no default application is
configured the user is prompted with an "open with" menu in the
terminal.
-d, --ask-default
Let the user choose a new default program for given files.
Exemplo:
mimeopen -d file.mp4
exemplo de saída:
Please choose a default application for files of type video/mp4
1) VLC media player (vlc)
2) Other...
Verifique:
xdg-open file.mp4