kde or gnome set vlc like default player for every formats kubuntu


Fast answer

type this in the konsole and and add these lines … *modify as need with brain*

kate /$HOME/.local/share/applications/mimeapps.list 

my file is this AUDIO + VIDEO = VLC

**NOTE IF YOU HAVE other application for html,text and images please consider only to add the video and the audio lines

[Added Associations]
video/x-flv=vlc.desktop;
video/x-msvideo=vlc.desktop;
video/3gpp=vlc.desktop;
video/annodex=vlc.desktop;
video/dv=vlc.desktop;
video/isivideo=vlc.desktop;
video/mlt-playlist=vlc.desktop;
video/mp2t=vlc.desktop;
video/mp4=vlc.desktop;
video/mpeg=vlc.desktop;
video/ogg=vlc.desktop;
video/quicktime=vlc.desktop;
video/vivo=vlc.desktop;
video/vnd.rn-realvideo=vlc.desktop;
video/wavelet=vlc.desktop;
video/x-anim=vlc.desktop;
video/x-flic=vlc.desktop;
video/x-flv=vlc.desktop;
video/x-matroska=vlc.desktop;
video/x-mng=vlc.desktop;
video/x-ms-asf=vlc.desktop;
video/x-ms-wmp=vlc.desktop;
video/x-ms-wmv=vlc.desktop;
video/x-msvideo=vlc.desktop;
video/x-nsv=vlc.desktop;
video/x-ogm+ogg=vlc.desktop;
audio/AMR-WB=vlc.desktop;
audio/AMR=vlc.desktop;
audio/aac=vlc.desktop;
audio/ac3=vlc.desktop;
audio/annodex=vlc.desktop;
audio/basic=vlc.desktop;
audio/midi=vlc.desktop;
audio/mp2=vlc.desktop;
audio/mp4=vlc.desktop;
audio/mpeg=vlc.desktop;
audio/ogg=vlc.desktop;
audio/prs.sid=vlc.desktop;
audio/vnd.rn-realaudio=vlc.desktop;
audio/x-adpcm=vlc.desktop;
audio/x-aifc=vlc.desktop;
audio/x-aiff=vlc.desktop;
audio/x-aiffc=vlc.desktop;
audio/x-ape=vlc.desktop;
audio/x-flac+ogg=vlc.desktop;
audio/x-flac=vlc.desktop;
audio/x-gsm=vlc.desktop;
audio/x-iriver-pla=vlc.desktop;
audio/x-it=vlc.desktop;
audio/x-m4b=vlc.desktop;
audio/x-matroska=vlc.desktop;
audio/x-minipsf=vlc.desktop;
audio/x-mo3=vlc.desktop;
audio/x-mod=vlc.desktop;
audio/x-mpegurl=vlc.desktop;
audio/x-ms-asx=vlc.desktop;
audio/x-ms-wma=vlc.desktop;
audio/x-musepack=vlc.desktop;
audio/x-pn-realaudio-plugin=vlc.desktop;
audio/x-psf=vlc.desktop;
audio/x-psflib=vlc.desktop;
audio/x-riff=vlc.desktop;
audio/x-s3m=vlc.desktop;
audio/x-scpls=vlc.desktop;
audio/x-speex+ogg=vlc.desktop;
audio/x-speex=vlc.desktop;
audio/x-stm=vlc.desktop;
audio/x-tta=vlc.desktop;
audio/x-voc=vlc.desktop;
audio/x-vorbis+ogg=vlc.desktop;
audio/x-wav=vlc.desktop;
audio/x-wavpack-correction=vlc.desktop;
audio/x-wavpack=vlc.desktop;
audio/x-xi=vlc.desktop;
audio/x-xm=vlc.desktop;
audio/x-xmf=vlc.desktop;

[Removed Associations]

refresh now your settings by typing this

kbuildsycoca4

note if you want add an application for example kmplayer too only for flv look at this example

video/x-flv=vlc.desktop;kde4-kmplayer.desktop;

Usefull stuff

Save old settings

mv /$HOME/.local/share/applications/mimeapps.list /$HOME/.local/share/applications/mimeapps.OLD

How can i reset what i did in this article?

 mv /$HOME/.local/share/applications/mimeapps.OLD   $HOME/.local/share/applications/mimeapps.list

How to set vlc like default video player

if you type into your konsole this

locate mime |  awk '/\/usr\/share\/mime\/video/{gsub (/\/usr\/share\/mime\//,""); gsub(/.xml/,""); a= $1 ;print $1"=vlc.desktop;"}' 

you will get a lots of stuff usefull to edit and set like default player vlc if you prefer other player just replace vlc.desktop on the code with for example kmplayer.desktop . If you want filter only the audio just use

locate mime |  awk '/\/usr\/share\/mime\/audio/{gsub (/\/usr\/share\/mime\//,""); gsub(/.xml/,""); a= $1 ;print $1"=vlc.desktop;"}' 

you should get something like this

video/3gpp=vlc.desktop;
video/annodex=vlc.desktop;
video/dv=vlc.desktop;
video/isivideo=vlc.desktop;
video/mlt-playlist=vlc.desktop;
video/mp2t=vlc.desktop;
video/mp4=vlc.desktop;
video/mpeg=vlc.desktop;
video/ogg=vlc.desktop;
video/quicktime=vlc.desktop;
video/vivo=vlc.desktop;
video/vnd.rn-realvideo=vlc.desktop;
video/wavelet=vlc.desktop;
video/x-anim=vlc.desktop;
video/x-flic=vlc.desktop;
video/x-flv=vlc.desktop;
video/x-matroska=vlc.desktop;
video/x-mng=vlc.desktop;
video/x-ms-asf=vlc.desktop;
video/x-ms-wmp=vlc.desktop;
video/x-ms-wmv=vlc.desktop;
video/x-msvideo=vlc.desktop;
video/x-nsv=vlc.desktop;
video/x-ogm+ogg=vlc.desktop;
video/x-sgi-movie=vlc.desktop;
video/x-theora+ogg=vlc.desktop;

edit the file

kate /$HOME/.local/share/applications/mimeapps.list 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s