<html>
<head>
<base href="https://bugs.freedesktop.org/" />
</head>
<body><span class="vcard"><a class="email" href="mailto:despair.blue@gmail.com" title="Danny Arnold <despair.blue@gmail.com>"> <span class="fn">Danny Arnold</span></a>
</span> changed
<a class="bz_bug_link
bz_status_REOPENED "
title="REOPENED - xdg-open does not exit if it does not recognize the mimetype"
href="https://bugs.freedesktop.org/show_bug.cgi?id=89902">bug 89902</a>
<br>
<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>What</th>
<th>Removed</th>
<th>Added</th>
</tr>
<tr>
<td style="text-align:right;">Status</td>
<td>NEEDINFO
</td>
<td>REOPENED
</td>
</tr></table>
<p>
<div>
<b><a class="bz_bug_link
bz_status_REOPENED "
title="REOPENED - xdg-open does not exit if it does not recognize the mimetype"
href="https://bugs.freedesktop.org/show_bug.cgi?id=89902#c11">Comment # 11</a>
on <a class="bz_bug_link
bz_status_REOPENED "
title="REOPENED - xdg-open does not exit if it does not recognize the mimetype"
href="https://bugs.freedesktop.org/show_bug.cgi?id=89902">bug 89902</a>
from <span class="vcard"><a class="email" href="mailto:despair.blue@gmail.com" title="Danny Arnold <despair.blue@gmail.com>"> <span class="fn">Danny Arnold</span></a>
</span></b>
<pre>Ok the problem is that xdg-mime and mimeopen think that the anchor is part of
the file name, thus they fail to return a mime type for it, so xdg-open goes
through the list of known browsers and falls through to lynx. Which it then
runs with eval.
1. I don't think lynx should be part of that list unless it's started with a
new terminal emulator, otherwise it just opens and blocks xdg-open.
2. The list should be more exhaustive, if it'd contain chromium or
google-chrome-stable it would work even on archlinux.
3. It might be better to use hash and exec instead of eval when going through
the browser, like this:
```
for browser in $BROWSER; do
if [ x"$browser" != x"" ]; then
browser_with_arg=`printf "$browser" "$1" 2>/dev/null`
if [ $? -ne 0 ]; then
browser_with_arg=$browser;
fi
hash $browser 2>/dev/null
if [ $? -ne 1 ]; then
if [ x"$browser_with_arg" = x"$browser" ]; then
exec $browser "$1" #$xdg_redirect_output;
else exec $browser_with_arg #$xdg_redirect_output;
fi
fi
fi
done
```
That way lynx could stay in the list and would work.
So, should I write a patch adding more known browsers, removing lynx, changing
the for loop or do you see another solution?
regards</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>