Bug 99538 - xdg-open does not handle multiple applications returned from xdg-mime
Summary: xdg-open does not handle multiple applications returned from xdg-mime
Status: RESOLVED MOVED
Alias: None
Product: Portland
Classification: Unclassified
Component: xdg-utils (show other bugs)
Version: TP
Hardware: All All
: medium normal
Assignee: Portland Bugs
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-01-25 17:53 UTC by Kjetil Torgrim Homme
Modified: 2019-02-16 13:38 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
possible default applications are separated by semicolons (1.07 KB, patch)
2017-01-25 17:53 UTC, Kjetil Torgrim Homme
Details | Splinter Review

Description Kjetil Torgrim Homme 2017-01-25 17:53:26 UTC
Created attachment 129146 [details] [review]
possible default applications are separated by semicolons

on my Fedora 24 system, xdg-mime will return a semicolon separated list (from /usr/share//applications/mimeapps.list).  xdg-open will use the whole string verbatim as the name of the desktop file, and it fails.

Example:

  $ /bin/xdg-mime query default image/jpeg
  eog.desktop;
  $ /bin/xdg-mime query default image/svg+xml
  eog.desktop;gthumb.desktop;

notice the trailing semicolon.

it seems to me xdg-open should split on ";" and look for each application in turn.  I have a patch to do so at

https://github.com/kjetilho/xdg-utils/tree/open-fix

the patch is enclosed.  it also fixes a trivial but critical typo in xdg-open.
Comment 1 Rex Dieter 2017-01-25 18:04:45 UTC
Alternatively, I think we can consider that 'xdg-mime default' return at most a single (validated) value.  By validated, I mean that it must/should(?) be verified to exist.
Comment 2 GitLab Migration User 2019-02-16 13:38:30 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/xdg/xdg-utils/issues/104.


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.