se você quiser associá-los diretamente e não torná-los padrão, adicione-os a
/usr/share/applications/mimeinfo.cache
(todo o sistema) ou
~/.local/share/applications/mimeinfo.cache
(por usuário).
edit: usando xdg-mime
, como geekosaur sugere, talvez seja mais robusto. Nesse caso, você desejaria
xdg-mime install [--mode mode] [--novendor] mimetypes-file
Adds the file type descriptions provided in
mimetypes-file
to the desktop environment.mimetypes-file
must be a XML file that follows the freedesktop.org Shared MIME-info Database specification and that has a mime-info element as its document root. For each new file type one or more icons with name major-minor must be installed with thexdg-icon-resource
command in the mimetypes context. For example theapplication/vnd.oasis.opendocument.text
filetype requires an icon by the name ofapplication-vnd.oasis.opendocument.text
to be installed.