Opening files in MPlayer through nautilus
Monday, November 26th, 2007There is no doubt that MPlayer is one of most amazing players around. Specially considering that it’s capability of handling all sort of codecs. I was a happy mplayer user until I upgraded MPlayer to 1.0rc2-4.1.3. After the upgrade when a file is opened via nautilus, it gives me an error message, “file://…..” cannot be opened. Opening the file via terminal worked perfectly. So, the problem was nautilus is sending the Gnome-VFS url of the file to mplayer and mplayer is not capable of handling URL, rather it needs a direct file path.
Thanks to some recent project I was pretty aware of “.desktop” files. The “.desktop” files are used by the desktop environment to get the list of available applications. So does in nautilus’ “open with” section. So, simply editing the “/usr/share/applications/mplayer.desktop” file and changing the Exec value from “gmplayer %U” to “gmplayer %F” solved the problem. Read the freedesktop spec for more information on Exec parameters.



