open with mplayer not available for video files

I use mplayer to view my videos. However, in 12.04, after installing mplayer, I do not see open with option in preference dialog. Could you please tell me how to add mplayer to the list.

I am pasting screenshot of my menus. Please let me know If I am missing any thing. Open with Options - Pop up MenuOpen with Options - Default Application Menu

Note: In second image, video option contains single Movie player entry.


Solution 1:

I had a similar problem with gnome. I used mimeopen to solve it, but the command was a little different :

mimeopen -d myfile.mp4

With this I could associate mp4 files with the mplayer command again.

Without "-d" it would use totem without asking.

Solution 2:

For the reference, I found that mimeopen helps to set via command line.

To set the file type to open with particular program use mimeopen as follows.

mimeopen .<file-extension>

Upon asking, choose the program if present in the menu. As mplayer was not available, I chose #2.

Please choose a default application for files of type video/x-matroska

    1) Movie Player  (totem)
    2) Other...

use application #2
use command: mplayer
Opening ".avi" with mplayer  (video/x-matroska)
MPlayer svn r34540 (Ubuntu), built with gcc-4.6 (C) 2000-2012 MPlayer Team
mplayer: could not connect to socket
mplayer: No such file or directory
Failed to open LIRC support. You will not be able to use your remote control.

Playing .avi.
File not found: '.avi'
Failed to open .avi.


Exiting... (End of file)

Now, If I open any .avi files via GUI, it opens, by default, with mplayer.