[Portland-bugs] [Bug 44163] xdg-open fails on encountering a list for x-scheme-handler

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Fri May 13 09:52:05 UTC 2016


https://bugs.freedesktop.org/show_bug.cgi?id=44163

--- Comment #2 from Wolfgang Bauer <wbauer at tmo.at> ---
I stumbled over the same problem when trying to reproduce a bug filed at
openSUSE's bugzilla (https://bugzilla.opensuse.org/show_bug.cgi?id=979265),
i.e. the same problem exists when trying to open a folder with xdg-open (e.g.
"xdg-open ." as in this specific openSUSE bugreport).

I don't think patching xdg-open is the proper solution though.
IMHO, "xdg-mime query default xxx" should not return the ';' (or the whole line
actually, including all listed applications) in the first place, it doesn't
when run inside a KDE session.

To demonstrate the problem more clearly:
Say, mimeapps.list contains this:
[Default Applications]
inode/directory=kde4-krusader.desktop;

Inside a KDE session "xdg-mime query default inode/directory" returns
"krusader.desktop".
In IceWM e.g. (i.e. when the generic path is taken) it's
"kde4-krusader.desktop;" instead, on which xdg-open chokes then.

The problem is even more obvious if you add a second application to the default
applications line, as explicitly mentioned in the specification
(https://specifications.freedesktop.org/mime-apps-spec/latest/ar01s04.html):
[Default Applications]
inode/directory=kde4-krusader.desktop;kde4-dolphin.desktop;

Inside KDE, xdg-mime still returns "krusader.desktop", but the generic version
returns the whole line, "kde4-krusader.desktop;kde4-dolphin.desktop;"

Apparently the correct behavior would be to check the specified desktop files
in the order specified and return only the first one that actually exists (this
is how it behaves inside a KDE session).
But it would help already if it would just strip everything after (and
including) the first semicolon I suppose.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/portland-bugs/attachments/20160513/75b35d39/attachment.html>


More information about the Portland-bugs mailing list