One can use «mimeopen -d file» to invoke an application to open a file in the command line. Afterwards the used application will be the default application associated with the file type, even from the Nautilus.
Example: Set nano as the default program to open *.txt files:
$ mimeopen -d file.txt
Please choose a default application for files of type text/plain
1) notepad (wine-extension-txt)
2) gedit (gedit)
3) GNU Emacs 23 (emacs23)
4) Other…
use application # 4
use command: nano
Opening «useful.txt» with nano (text/plain)