Ubuntu – Default Program Selection

default-programs

I have to justify why my question is different to the answer someone linked. Basically if you go to system > details > default apps, this sets the default app for ALL video file types as opposed to just an mp4 or whatever.

Can you please explain how to set a particular file extension or file type to open with a different default application. For example, I have just installed VLC player and I want all my video files to default to open with VLC when I click on them.

I've tried right clicking on a video file, selecting "open with" & clicking "other application". Then I highlighted the default video application from the menu and selected "forget association" so that VLC is the only option in the the in the "recommended application" list. When I double click on my video file it still opens with the default video player instead of VLC. So what can I do to fix it?

Best Answer

To do it command line like:

Check if totem is the default for your video:

cat /usr/share/applications/defaults.list | grep video

The output would be like(many other lines):

video/x-avi=totem.desktop

Append those lines to the file ~/.local/share/applications/mimeapps.list This contain the mimeapps with theri association

cat /usr/share/applications/defaults.list | grep video >> ~/.local/share/applications/mimeapps.list

Now open the file

gedit ~/.local/share/applications/mimeapps.list

and replace all occurence of totem with vlc (you can use the shortcut Ctrl+H)

save and exit. enjoy

source and more info

Note: If you want to make it available for all users in your system you should replace all occurrence of totem with vlc in the /usr/share/applications/defaults.list instead of ~/.local/share/applications/mimeapps.list.

To do it GUI like:

Rightclick any video file, choose properties. Choose Open With and there you can select VLC and the option set as default (bottom right).

enter image description here

This requires you to do that for every video type (mp4, mpg , mpeg, mov ....)...

Another perfect method is to use the option in Default applications.

go to "System Settings" "Details" "Default Applications"

CLick on the "down arrow" for "Video"

Select "VLC Media Player"

Then close window.

enter image description here

Related Question