<html>
<head>
<base href="https://bugs.freedesktop.org/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Priority</th>
<td>medium
</td>
</tr>
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW --- - xdg-open fails to open file:// URLs with URL fragments"
href="https://bugs.freedesktop.org/show_bug.cgi?id=74804">74804</a>
</td>
</tr>
<tr>
<th>Assignee</th>
<td>portland-bugs@lists.freedesktop.org
</td>
</tr>
<tr>
<th>Summary</th>
<td>xdg-open fails to open file:// URLs with URL fragments
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr>
<tr>
<th>OS</th>
<td>Linux (All)
</td>
</tr>
<tr>
<th>Reporter</th>
<td>a.c.kalker@gmail.com
</td>
</tr>
<tr>
<th>Hardware</th>
<td>x86-64 (AMD64)
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Version</th>
<td>unspecified
</td>
</tr>
<tr>
<th>Component</th>
<td>xdg-utils
</td>
</tr>
<tr>
<th>Product</th>
<td>Portland
</td>
</tr></table>
<p>
<div>
<pre>OS: Arch Linux
WM: i3
xdg-utils @ 6da906f
Trying to open a file:// URL containing an URL fragment gives an error:
$ ls $(pwd)/*.html
/home/miki/index.html
$ XDG_UTILS_DEBUG_LEVEL=3 xdg-open "file://$(pwd)/index.html#anchor"
Selected DE generic
xdg-open: file '/home/miki/index.html#anchor' does not exist
A real-world example of this problem is Dropbox, where choosing "Launch Dropbox
Website" from the menu leads to a similar error.
Even setting the default handler for file:// URLS doesn't solve the problem:
$ xdg-mime default chromium.desktop x-scheme-handler/file
$ xdg-mime query default x-scheme-handler/file
chromium.desktop
$ XDG_UTILS_DEBUG_LEVEL=3 xdg-open "file://$(pwd)/index.html#anchor"
Selected DE generic
xdg-open: file '/home/miki/index.html#anchor' does not exist
The browser handles these URLs without problems:
$ chromium "file://$(pwd)/index.html#anchor"
(browse away)
Specifying URL fragments (f.i. as 'anchors') is a very useful feature which
xdg-open should not interfere with, IMHO.
In particular, when user sets a default handler for file:// URLs, xdg-open
should honor that.</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>