Summary: | xdg-open behaviour about %i contradicts desktop entry standard | ||
---|---|---|---|
Product: | Portland | Reporter: | Olivier Diotte <vhann3000+freedesktop> |
Component: | xdg-utils | Assignee: | Portland Bugs <portland-bugs> |
Status: | RESOLVED MOVED | QA Contact: | |
Severity: | normal | ||
Priority: | medium | CC: | vhann3000+freedesktop |
Version: | 1.1.0 rc2 | ||
Hardware: | Other | ||
OS: | All | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Bug Depends on: | |||
Bug Blocks: | 23105 | ||
Attachments: |
Patch adding crude handling of %i and %c
Improved patch to handle multi-word Names like "Mozilla Firefox" |
Description
Olivier Diotte
2014-02-26 15:30:07 UTC
I cannot reproduce this error on kde (fedora 20) using xdg-utils-1.1.0-rc2 In short, xdg-open foo.pdf runs okular without error for me. What desktop environment are you using? I'm going to guess that the "generic" code path is hitting here, I think that's the only one that tries to parse .desktop files (In reply to comment #1) > I cannot reproduce this error on kde (fedora 20) using xdg-utils-1.1.0-rc2 > > In short, > > xdg-open foo.pdf > > runs okular without error for me. > > > What desktop environment are you using? I am using wmii that I start manually with 'startx', so yes, generic. Here is the result of 'env | grep -i XDG': XDG_SESSION_COOKIE=[redacted since I have no idea if this is sensitive information] XDG_CONFIG_DIRS=/etc/xdg XDG_DATA_DIRS=/usr/local/share:/usr/share Created attachment 107754 [details]
Patch adding crude handling of %i and %c
I think I have found the problem:
In the function search_desktop_file() of xdg-open, only %[fFuU] is handled. %i should be replaced by --icon <value of Icon key here>.
Attached is a patch that seems to work for that (and, as a bonus also replaces %c by the name, although it should technically replace it by the Name[<correct language>]).
I have tested with bash and bash in 'sh mode'. checkbashisms also doesn't complain.
Created attachment 114180 [details] [review] Improved patch to handle multi-word Names like "Mozilla Firefox" I just realized that my patch caused issues with Firefox. Better late than never I guess. -- 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/71. |
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.