Example: MPlayer should start WMV by Double-Click
I've uninstalled Xine and Totem, cause i only use MPlayer. After uninstalling them, I saw a disaster: Totem used to be the default player. And now there was ... nothing!
After two days of internet research, this essay was created ... so that you don't waste your time the way I had to.
Creating the desktop file
If it is not already existing, create the file "
/usr/share/applications/mplayer.desktop" like this:
Code:
[Desktop Entry]Name=Movie PlayerComment=Play multimedia files and mediaIcon=mplayer.xpmExec=gmplayer %fTerminal=falseMimeType=video/mpeg;video/x-msvideo;video/quicktime;video/x-ms-asf;video/x-ms-wmvType=ApplicationCategories=Application;AudioVideo;Encoding=UTF-8The mime types for asf and wmv already exist and are stored in the mime type database (/usr/share/mime/packages/freedesktop.org.xml)
Modify
defaults.listThis file will init our DEFAULT application. It ONLY contains ONE desktop file for EACH mime type:
Code:
video/x-ms-asf=mplayer.desktopvideo/x-ms-wmv=mplayer.desktopModify mimeinfo.cache
To take effect as default application and init the double-click feature, we need to modify the
mimeinfo.cache also:
Code:
video/x-ms-asf=mplayer.desktopvideo/x-ms-wmv=mplayer.desktopThis file can use MORE then ONE desktop file. If you want to be able to handle - for example - WMV files with different players, a line like this is also acceptable:
Code:
video/x-ms-wmv=mplayer.desktop;realplay.desktopThis will change the right-click-menu and insert Helix-Player, while mplayer is still default (with double-click)
After modification, log out from gnome and log in again...