HowTo _totally_ replace Totem with VLC.
As you know that totem is rather limited. It's nice, but it's limited. VLC is a much more capable video player.
This is a handy trick thanks to the Freedesktop.org folks. It's based around the 'MIME' file type detection that is now integrated into KDE and Gnome desktops.
One of the newer Freedesktop.org standards that are silently making Linux user's lives better is the little known '.desktop' file standard.
These files are used to tell the GUI portion of Gnome or KDE what application to launch, how to launch it, it's name in different languages, and other such details. Then it's used in your menus and other such things.
Then to go along with that you have a file that is called 'defaults.list'.
This file is were preferences are stored for launching applications. This way settings you make in Gnome carry over to KDE. Also special shells like 'Fish' can make use of them to launch applications also with it's 'open' command. So this way irregardless of how you make your preferences they will carry over to all .desktop using applications.
This is very important for 'unifying' your desktop because just a year or two ago when you'd open up a .html file (for example) in Konqueror it may pop open in konqueror. If you open it in Gnome it may open up into Epiphany. If some third party application tries to open it up it may open it up in Mozilla. But you want Firefox to be the default browser. So previously you'd have to go and configure KDE and Gnome seperately and still then third party apps may have their own setup that you just can't do anything about easily.
So say your using a newer version of Ubuntu or whatnot. By default it may want to use Totem for stuff, but you may not like totem. You like VLC.
So you install vlc. Somewere in your file system is a vlc.desktop file, hopefully. If there isn't, it's easy to make one.
To make a new desktop file all you have to do is while running Gnome, find a media file that vlc can play. Right click it, select 'Open with other application' then do your custom command.
You will find that this makes a new file ~/.local/share/applications/vlc-usercreated.desktop
But you should have a vlc.desktop file anyways, somewere.
So here is the trick:
(the one thing that sucks If you have a bunch of file associations already done then this may not be that clever since it will wipe all those out.)
Locate the default default.list
You will have at least one on your system, maybe two if your using KDE and Gnome. Run this command to find it:
> locate defaults.list
(if locate doesn't work because the system is to new, or you just installed a bunch of new stuff then run 'sudo updatedb' first. This will update the locate database)
Mine is located in /usr/share/gnome/applications/defaults.list
make the directory for it...
> mkdir -p ~/.local/share/applications
copy the default.list to that..
> cp /usr/share/gnome/applications/defaults.list ~/.local/share/applications/
Then to change everything over to vlc you will use one of the more advanced features of Vi.
> vi ~/.local/share/applications/defaults.list
Now follow these key presses exaclty.. (the : is important)
: % s/totem/vlc/g
or if you had to create your own...
: % s/totem/vlc-usercreated/g
Note that for different versions of gnome it may name the *.desktop files something differently. Any user-created files will end up in ~/.local/share/applications so you may want to check that out to find the the actual file name if it's not *-usercreated.desktop
And then if that works then the editor will scroll down to the bottom of the file and then replace what you typed with something like:
86 substitutions on 86 lines
This means that it substituted vlc for totem on 86 different file types.
Then hit
:wq
to save the changes and exit.
Now you don't have to restart or log out or anything. Once you save that file then the changes should be automatic. Double click on any media file and it should now open up in vlc.
If it doesn't work then you can just delete ~/.local/share/applications/defaults.list file and everything will go back to the system defaults.
Otherwise if you don't like using vi like that then you can go through the gui and before you double click on a file.. right click ---> goto "properties" ---> hit the "open with" tab ---> then check the mark next to 'vlc'.
And that should work with most things, even if it's not all elite like using vi.