Bug 49204

Summary: xdg-open: open_generic_xdg_mime ignores options and field codes in Exec field
Product: Portland Reporter: rephorm
Component: xdg-utilsAssignee: Portland Bugs <portland-bugs>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: medium Keywords: patch
Version: 1.1.0 rc1   
Hardware: Other   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments: "%i" and "%c" field codes handling

Description rephorm 2012-04-26 21:58:36 UTC
For a generic desktop environment, the Exec entry of a .desktop file is not properly parsed, and only the first word is used. Any options or field codes (e.g. %u) are ignored. This breaks app launching if command line options are required and is not compliant with the specification.
Comment 1 Mikhail Krivtsov 2013-12-20 08:19:17 UTC
Created attachment 91020 [details]
"%i" and "%c" field codes handling

1.1.0 version has some handling for "%f", "%F", "%u", "%U" field codes.  Proposed patch adds handling for "%i" and "%c" field codes necesary for some .desktop files from kde4 (for example: "Exec=okular %U %i -caption %c").
Comment 2 Rex Dieter 2013-12-20 19:06:29 UTC
thanks!

I'll try to give it a quick look over soon and commit.
Comment 3 Rex Dieter 2014-03-30 22:33:51 UTC
Thanks, adapted another similar approach.

http://cgit.freedesktop.org/xdg/xdg-utils/commit/?id=316b9adc05c6d871360afb1195939c5fc975ccff

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.