Bug 102063 - xdg-open ignores mimeapps.list
Summary: xdg-open ignores mimeapps.list
Status: RESOLVED WORKSFORME
Alias: None
Product: Portland
Classification: Unclassified
Component: xdg-utils (show other bugs)
Version: 1.1.0 rc3
Hardware: Other All
: medium normal
Assignee: Portland Bugs
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-08-07 04:29 UTC by Nazar Mokrynskyi
Modified: 2017-11-29 20:28 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Nazar Mokrynskyi 2017-08-07 04:29:26 UTC
nazar-pc@nazar-pc ~> cat ~/.local/share/applications/mimeapps.list 
[Default Applications]
inode/directory=nemo.desktop
application/x-gnome-saved-search=nemo.desktop
text/xml=org.gnome.gedit.desktop
video/x-matroska=smplayer.desktop
nazar-pc@nazar-pc ~> xdg-mime query default video/x-matroska
smplayer.desktop

The above is enough to open *.mkv files in Nemo file manager with SMPlayer, but when using xdg-open it still always uses MPV.

Also, `xdg-mime query filetype '/path/to/file.mkv'` doesn't output anything for the files I'm having issues with. So looks like it struggles to determine its mime type, but somehow still manages to select wrong application by guessing.
Comment 1 Rex Dieter 2017-11-29 20:18:58 UTC
does ~/.config/mimeapps.list exist?  (if so, that is prefered)
Comment 2 Rex Dieter 2017-11-29 20:28:13 UTC
Seems to work for me using ~/.config/mimeapps.list :

# current default
$ xdg-mime query default video/x-matroska
org.kde.dragonplayer.desktop

$ echo 'video/x-matroska=smplayer.desktop;' >> ~/.config/mimeapps.list

$ xdg-mime query default video/x-matroska
smplayer.desktop

tested under kde plasma5 and also using 

XDG_CURRENT_DESKTOP=generic DE=generic xdg-mime ...


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.