3

I have a file downloaded using google-chrome-stable in ~/Downloads/video.mkv, but clicking the file in Chrome's downloads page somehow opens the file in Firefox instead of my default video player.

Running xdg-open ~/Downloads/video.mkv correctly opens my default player, mpv.

xdg-mime query default $(xdg-mime query filetype ~/Downloads/video.mkv) also correctly outputs mpv.desktop.

xdg-settings get default-web-browser outputs google-chrome.desktop.

I'm not sure why it's triggering Firefox here. Any way to fix this behaviour?

EDIT: I've managed to narrow down the bug. The problem is that mpv crashes when Chrome tries to open it, which is why it falls back to opening the file path with a browser (this can be overridden with the BROWSER environment variable, but it somehow defaults to Firefox).

This is the log:

mpv: symbol lookup error: mpv: undefined symbol: vkCreateXlibSurfaceKHR

I have no idea why mpv is throwing this error. This error does not occur if I run mpv normally in the command line.

2
  • I"m having this same issue which is breaking my ability to use ff2mpv and similar extensions... traced it down to the same error about vkCreateXlibSurfaceKHR. Everything works fine if I just use mpv from the terminal. Arch linux.
    – NeuroXc
    Apr 1, 2023 at 15:30
  • 2
    I found the solution here: reddit.com/r/mpv/comments/ry9sgi/… In short, launch Chrome with the env set like this: LD_PRELOAD=/usr/lib/libvulkan.so.1 google-chrome-stable Apr 2, 2023 at 6:11

1 Answer 1

0

Open the mimeapps.list file. You can find the file at ~/.local/share/applications/mimeapps.list. If the file doesn't exist, create a new one.

Check if there's an entry for the MIME type of the video file (in this case, video/x-matroska for .mkv files). If there's no entry, add one. If there's an existing entry that points to Firefox, change it to point to your preferred video player (mpv.desktop in your case). The entry should look like this:

[Default Applications]
video/x-matroska=mpv.desktop

Save the file and close the text editor.

Restart Chrome and try opening the video file again from the downloads page. It should now open in mpv, your default video player.

If this doesn't work, you may want to report the issue to the Google Chrome team as a bug, as it could be a problem with how Chrome handles file associations on your system.

1
  • 1
    Unfortunately it doesn't work. Also, the file in ~/.local/share/applications/mimeapps.list. is empty, but there is a default one generated in ~/.config/mimeapps.list. But it contains no references to Firefox there, so I have no idea why it's even triggered. Mar 28, 2023 at 17:12

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .