Bug 60329 - 'xdg-mime query default' return multiple .desktop entries.
Summary: 'xdg-mime query default' return multiple .desktop entries.
Status: RESOLVED FIXED
Alias: None
Product: Portland
Classification: Unclassified
Component: xdg-utils (show other bugs)
Version: unspecified
Hardware: All All
: high major
Assignee: Portland Bugs
QA Contact:
URL:
Whiteboard:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2013-02-05 16:39 UTC by Alex Sokoloff
Modified: 2015-02-24 17:44 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
Patch to fix the multiple desktop files report by xdg-mime (1.58 KB, patch)
2014-08-13 08:08 UTC, Lionel Orry
Details | Splinter Review

Description Alex Sokoloff 2013-02-05 16:39:11 UTC
I'm not using DE, and I have 2 records for text/plain 

grep "text/plain" /usr/share//applications/defaults.list
text/plain=gedit.desktop

grep "text/plain" /usr/share//applications/mimeinfo.cache 
text/plain=kde4-kate.desktop;

xdg-mime from trunk return 2 .desktop entries.

./xdg-mime query default text/plain
gedit.desktop kde4-kate.desktop
Comment 1 Lionel Orry 2014-08-13 08:07:16 UTC
This issue was blocking for me on Fedora 20.

I had the entry 'application/pdf=evince.desktop' in both defaults.list and mimeinfo.cache, and running

xdg-mime query default application/pdf

returned

evince.desktop evince.desktop

The line above would not be parsed properly by xdg-open and the pdf files were opened by the fallback browser.

An attached patch fixes the problem. Please consider it.
Comment 2 Lionel Orry 2014-08-13 08:08:21 UTC
Created attachment 104545 [details] [review]
Patch to fix the multiple desktop files report by xdg-mime
Comment 4 Lionel Orry 2015-02-24 17:44:22 UTC
Awesome ! Thanks a lot for applying.

Cheers
Lionel


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.