Difference between revisions of "VLC HowTo/Make VLC the default player"

From VideoLAN Wiki
Jump to navigation Jump to search
m
Line 11: Line 11:
 
==== GNOME ====
 
==== GNOME ====
  
Gnome use a list that is located in '''''/usr/share/applications/defaults.list''''' to associate applications to file types.<br/>
+
Gnome uses two lists (located at '''''/usr/share/applications/''''') '''mimeinfo.cache''' and '''defaults.list''', to register applications to file types.<br/>
 
So you could either edit it manually or use the tools that GNOME has for this.<br/>
 
So you could either edit it manually or use the tools that GNOME has for this.<br/>
  
  
 
===== Instructions on how to do it in GNOME. =====
 
===== Instructions on how to do it in GNOME. =====
 +
 +
===== Changing the default application for videos using menus(the easy way): =====
 +
 +
System -> Preferences -> Personal -> Preferred Applications -> Multimedia -> Custom -> Type this: vlc %U
 +
 +
ps: not tested yet.
 +
 +
===== Changing the default application for videos using menus(the not so easy way): =====
  
 
{| class="wikitable"
 
{| class="wikitable"
Line 24: Line 32:
 
| <br/>* If the VLC icon don't show up on the '''''Open With''''' tab, click on the '''''add''''' button in the lower corner to the right of the window<br/>tha has a plus sign, and locate VLC on the window tha pops up that is called Add Application.<br/>http://upload.wikimedia.org/wikipedia/commons/5/51/Add_app.png<br/>
 
| <br/>* If the VLC icon don't show up on the '''''Open With''''' tab, click on the '''''add''''' button in the lower corner to the right of the window<br/>tha has a plus sign, and locate VLC on the window tha pops up that is called Add Application.<br/>http://upload.wikimedia.org/wikipedia/commons/5/51/Add_app.png<br/>
 
|}
 
|}
 +
 +
===== Changing the default application for videos manually(the hard way): =====
 +
 +
In Fedora 10 the path /usr/share/applications/ will take you to these 2 files that configure what application open a type of file.<br/>
 +
<br/>
 +
'''defaults.list'''<br/>
 +
'''mimeinfo.cache'''<br/>
 +
<br/>
 +
ps:
 +
Both files will point to a Desktop Entry file([name of the file].desktop) that is inside the ''applications'' folder, and the 2 important things inside that file are the configurations for what MIME Types the application can handle and how to launch the application.
 +
 +
A ''Desktop Entry'' file is a data file that provides information about an item in a menu.
 +
The desktop entry specification describes desktop entries as files describing information about an application such as the name, MIME Types it handles, icon, and description. These files are used for application launchers and for creating menus of applications that can be launched.<br/>
 +
If you don't have the VLC ''Desktop Entry'' file or it disapear for some reason you will have to make one. Look [http://library.gnome.org/admin/system-admin-guide/stable/menustructure-desktopentry.html.en here] for some pointers.
 +
<br/>
 +
 +
You only need to modify '''mimeinfo.cache''', I hope. It works here if It don't work for you please edit this.<br/>
 +
 +
So what you have to do is:
 +
 +
# Open ''mimeinfo.cache'' as root.
 +
# Search for the MIME Types for video.
 +
# Change all of them to use VLC.
 +
 +
ex:<br/>
 +
Registry of MIME Type (video/quicktime) in ''mimeinfo.cache'' to use VLC.<br/>
 +
<br/>
 +
video/quicktime=livna-vlc.desktop;totem.desktop;miro.desktop;<br/>
 +
<br/>
 +
The format is:<br/>
 +
[MIME Type]=[Name of the Desktop Entry file]<br/>
 +
<br/>
 +
'''Note:''' You can put more then one ''Desktop Entry'' but they need to be separated by a semi-colon (;), see the example above.<br/>
 +
Those extra entries will appear as options when you right-click on the video file and go to the ''Open With'' submenu.<br/>
 +
'''Tip:''' Nautilus don't show the real names of the ''Desktop Entry'' files. Either drag and drop it on gedit so you see the name on the tab or use '''ls''' to list the files on the command line.
 +
===== References =====
 +
 +
[http://library.gnome.org/admin/system-admin-guide/stable/menustructure-desktopentry.html.en Desktop Entry Files]
 +
 +
[http://library.gnome.org/admin/system-admin-guide/stable/mimetypes-registering.html.en Registering Applications for MIME Types] (Editing defaults.list and mimeinfo.cache)
 +
 +
 
==== KDE ====
 
==== KDE ====

Revision as of 07:22, 11 February 2009

Windows

Mac

Linux

Fedora

GNOME

Gnome uses two lists (located at /usr/share/applications/) mimeinfo.cache and defaults.list, to register applications to file types.
So you could either edit it manually or use the tools that GNOME has for this.


Instructions on how to do it in GNOME.
Changing the default application for videos using menus(the easy way):

System -> Preferences -> Personal -> Preferred Applications -> Multimedia -> Custom -> Type this: vlc %U

ps: not tested yet.

Changing the default application for videos using menus(the not so easy way):
* Right-click on the video file that you want VLC to open.
* Choose properties.
* Now in the properties window click on the tab named Open With.
800px-Properties_window.png

* In the tab Open With just choose VLC as your player for that type of file.
Just remember that you will have to do this for each an every type of video/audio file(ex: mpg, avi, rm, mkv, ogg, mp3 etc)
800px-Open_with_tab.png

* If the VLC icon don't show up on the Open With tab, click on the add button in the lower corner to the right of the window
tha has a plus sign, and locate VLC on the window tha pops up that is called Add Application.
Add_app.png
Changing the default application for videos manually(the hard way):

In Fedora 10 the path /usr/share/applications/ will take you to these 2 files that configure what application open a type of file.

defaults.list
mimeinfo.cache

ps: Both files will point to a Desktop Entry file([name of the file].desktop) that is inside the applications folder, and the 2 important things inside that file are the configurations for what MIME Types the application can handle and how to launch the application.

A Desktop Entry file is a data file that provides information about an item in a menu. The desktop entry specification describes desktop entries as files describing information about an application such as the name, MIME Types it handles, icon, and description. These files are used for application launchers and for creating menus of applications that can be launched.
If you don't have the VLC Desktop Entry file or it disapear for some reason you will have to make one. Look here for some pointers.

You only need to modify mimeinfo.cache, I hope. It works here if It don't work for you please edit this.

So what you have to do is:

  1. Open mimeinfo.cache as root.
  2. Search for the MIME Types for video.
  3. Change all of them to use VLC.

ex:
Registry of MIME Type (video/quicktime) in mimeinfo.cache to use VLC.

video/quicktime=livna-vlc.desktop;totem.desktop;miro.desktop;

The format is:
[MIME Type]=[Name of the Desktop Entry file]

Note: You can put more then one Desktop Entry but they need to be separated by a semi-colon (;), see the example above.
Those extra entries will appear as options when you right-click on the video file and go to the Open With submenu.
Tip: Nautilus don't show the real names of the Desktop Entry files. Either drag and drop it on gedit so you see the name on the tab or use ls to list the files on the command line.

References

Desktop Entry Files

Registering Applications for MIME Types (Editing defaults.list and mimeinfo.cache)


KDE