Case in point: multimedia files. I happen to prefer MPlayer, from the Debian multimedia package repository, over Totem - the default multimedia player in GNOME:
- open Nautilus, find the file you want to open with MPlayer
- right-click on the file
- from the pop-up menu select "Open with Other Application..."
- wait for the "Installed Aplications" list to be populated and then select "MPlayer"
This should open the file with gmplayer (MPlayer with a graphical user interface), and add an MPlayer entry to the pop-up menu.
The only problem with this is that MPlayer fails to open the file if its name happens to contain spaces. It issues an error message like this: "Failed to open file file:///home/zungbang/test%20clip.avi." The problem is rather obvious: the spaces are translated to %20, which is usual in URIs, but apparently MPlayer doesn't expect this.
The issue seems to be well known (see Debian bug report #471924 and the following Ubuntu Forums threads: Opening files with MPlayer and mplayer can't play file with space in file name). And the proposed solution is to replace the string gmplayer %U with gmplayer %F in /usr/share/applications/mplayer.desktop and/or ~/.local/share/applications/mplayer.desktop.
Well, I modified the first file and nothing happened, I then tried modifying the latter file, only to find out that there was no such file. Damn. But I did spot files named mplayer-usercustom.desktop and mplayer-usercreated.desktop. After examining their contents and comparing with the first file, I removed them, copied the first file to ~/.local/share/applications and restarted Nautilus. This did the trick. Hooray.
To make MPlayer the default player, so that it's launched directly by double-clicking the file in Nautilus:
- right-click a multimedia file, select "Properties"
- select the "Open With" tab
- mark the open circle next to "MPlayer"
- press "Close"