2

xdg-open opens .webm files in Firefox despite of the association video/ mime type with MPV.

Contents of the files I suppose to be relevant:

~/.config/mimetypes.list:

[Default Applications]
application/pdf=org.pwmt.zathura.desktop
audio/*=mpv.desktop
image/*=feh.desktop
text/*=vim.desktop
video/*=mpv.desktop

Video files mime types in mpv.desktop:

MimeType=video/mpeg;video/x-mpeg2;video/x-mpeg3;video/mp4v-es;video/x-m4v;video/mp4;
video/divx;video/vnd.divx;video/msvideo;video/x-msvideo;video/ogg;
video/quicktime;video/vnd.rn-realvideo;video/x-ms-afs;video/x-ms-asf;
;video/x-ms-wmv;video/x-ms-wmx;video/x-ms-wvxvideo;video/x-avi;video/avi;
video/x-flic;video/fli;video/x-flc;video/flv;video/x-flv;video/x-theora;video/x-theora+ogg;
video/x-matroska;video/mkv;video/webm;video/x-ogm;video/x-ogm+ogg;video/vnd.mpegurl;
video/3gp;video/3gpp;video/3gpp2;video/dv;video/vnd.avi;

Video files mime types in firefox.desktop:

MimeType=video/ogg;video/webm;

xdg-mime query output:

生き甲斐-> xdg-mime query default video/*
mpv.desktop
生き甲斐-> xdg-mime query default video/webm
firefox.desktop

When I explicitly add video/webm=mpv.desktop to ~/.config/mimetypes.list everything works like expected. But isn't it that video/*=mpv.desktop in mimetypes.list should be enough?

ChanganAuto
  • 1
  • 4
  • 18
  • 19
ikigai
  • 21

1 Answers1

1

If you installed "perl-file-mimeinfo", you could list the configured programs (using an example file "./myVideo.webm") with

mimeopen -a ./myVideo.webm

and try out the given programs. To change the default,

mimeopen -d ./myVideo.webm

will permanently set the default for all files of this type.

Details on this Perl module at https://metacpan.org/release/File-MimeInfo but your operating system might already provide an installer package.

BGa
  • 11