Three such programs that identify the file type and run or give a list of suggestions:
All of these can be run on the command line. Their behavior can be modified by various options. For example:
mimeopen -a filename
With the -a
option, mimeopen
will show a text menu of available programs and prompt you to choose one. Running mimeopen -a
on a mp3 file, for example, might produce:
$ mimeopen -a somemusic.mp3
Please choose an application
1) VLC media player (vlc)
2) Enqueue in SMPlayer (smplayer_enqueue)
3) GNOME MPlayer (gnome-mplayer)
4) SMPlayer (smplayer)
5) Audacious (audacious)
use application #
The last line above is a prompt. If you enter 1,2,3,4 or 5, the associated program will start. Enter anything else and mimeopen
will terminate.
In contrast:
mimeopen -n filename
The above will not ask. It will just run the default program on filename
. To choose/set the default for a file, run:
mimeopen -d filename