I would like to set the default video player from the command line. Taking xvideos
as an example, I tried replacing all references to Totem by xvideos
in the defaults.list
file:
mv /usr/share/applications/defaults.list /usr/share/applications/defaults.list.old.totem
sed 's/Totem/xvideos/' /usr/share/applications/defaults.list.old.totem > /usr/share/applications/defaults.list
The contents of this file now look like:
$ cat /usr/share/applications/defaults.list | grep xvideos
application/vnd.rn-realmedia=org.gnome.xvideos.desktop
application/x-extension-m4a=org.gnome.xvideos.desktop
application/x-extension-mp4=org.gnome.xvideos.desktop
application/x-matroska=org.gnome.xvideos.desktop
application/x-shockwave-flash=org.gnome.xvideos.desktop
audio/3gpp=org.gnome.xvideos.desktop
audio/ac3=org.gnome.xvideos.desktop
audio/AMR=org.gnome.xvideos.desktop
audio/AMR-WB=org.gnome.xvideos.desktop
audio/basic=org.gnome.xvideos.desktop
audio/midi=org.gnome.xvideos.desktop
audio/mp4=org.gnome.xvideos.desktop
audio/mpeg=org.gnome.xvideos.desktop
audio/mpegurl=org.gnome.xvideos.desktop
audio/prs.sid=org.gnome.xvideos.desktop
audio/vnd.rn-realaudio=org.gnome.xvideos.desktop
audio/x-ape=org.gnome.xvideos.desktop
audio/x-gsm=org.gnome.xvideos.desktop
audio/x-it=org.gnome.xvideos.desktop
audio/x-m4a=org.gnome.xvideos.desktop
audio/x-matroska=org.gnome.xvideos.desktop
audio/x-mod=org.gnome.xvideos.desktop
audio/x-ms-asf=org.gnome.xvideos.desktop
audio/x-ms-asx=org.gnome.xvideos.desktop
audio/x-ms-wax=org.gnome.xvideos.desktop
audio/x-ms-wma=org.gnome.xvideos.desktop
audio/x-musepack=org.gnome.xvideos.desktop
audio/x-pn-aiff=org.gnome.xvideos.desktop
audio/x-pn-au=org.gnome.xvideos.desktop
audio/x-pn-realaudio=org.gnome.xvideos.desktop
audio/x-pn-realaudio-plugin=org.gnome.xvideos.desktop
audio/x-pn-wav=org.gnome.xvideos.desktop
audio/x-pn-windows-acm=org.gnome.xvideos.desktop
audio/x-realaudio=org.gnome.xvideos.desktop
audio/x-real-audio=org.gnome.xvideos.desktop
audio/x-sbc=org.gnome.xvideos.desktop
audio/x-speex=org.gnome.xvideos.desktop
audio/x-tta=org.gnome.xvideos.desktop
audio/x-wav=org.gnome.xvideos.desktop
audio/x-wavpack=org.gnome.xvideos.desktop
audio/x-xm=org.gnome.xvideos.desktop
image/vnd.rn-realpix=org.gnome.xvideos.desktop
misc/ultravox=org.gnome.xvideos.desktop
video/3gpp=org.gnome.xvideos.desktop
video/dv=org.gnome.xvideos.desktop
video/fli=org.gnome.xvideos.desktop
video/flv=org.gnome.xvideos.desktop
video/mp2t=org.gnome.xvideos.desktop
video/mp4=org.gnome.xvideos.desktop
video/mp4v-es=org.gnome.xvideos.desktop
video/mpeg=org.gnome.xvideos.desktop
video/msvideo=org.gnome.xvideos.desktop
video/ogg=org.gnome.xvideos.desktop
video/quicktime=org.gnome.xvideos.desktop
video/vivo=org.gnome.xvideos.desktop
video/vnd.divx=org.gnome.xvideos.desktop
video/vnd.rn-realvideo=org.gnome.xvideos.desktop
video/vnd.vivo=org.gnome.xvideos.desktop
video/webm=org.gnome.xvideos.desktop
video/x-anim=org.gnome.xvideos.desktop
video/x-avi=org.gnome.xvideos.desktop
video/x-flc=org.gnome.xvideos.desktop
video/x-fli=org.gnome.xvideos.desktop
video/x-flic=org.gnome.xvideos.desktop
video/x-flv=org.gnome.xvideos.desktop
video/x-m4v=org.gnome.xvideos.desktop
video/x-matroska=org.gnome.xvideos.desktop
video/x-mpeg=org.gnome.xvideos.desktop
video/x-ms-asf=org.gnome.xvideos.desktop
video/x-ms-asx=org.gnome.xvideos.desktop
video/x-msvideo=org.gnome.xvideos.desktop
video/x-ms-wm=org.gnome.xvideos.desktop
video/x-ms-wmv=org.gnome.xvideos.desktop
video/x-ms-wmx=org.gnome.xvideos.desktop
video/x-ms-wvx=org.gnome.xvideos.desktop
video/x-nsv=org.gnome.xvideos.desktop
video/x-ogm+ogg=org.gnome.xvideos.desktop
video/x-theora+ogg=org.gnome.xvideos.desktop
video/x-totem-stream=org.gnome.xvideos.desktop
x-content/video-dvd=org.gnome.xvideos.desktop
x-content/video-vcd=org.gnome.xvideos.desktop
x-content/video-svcd=org.gnome.xvideos.desktop
However, videos are still being opened with Totem by default, say, if I double click on a movie file in the file manager.
How else can this be achieved?