Bug 74804 - xdg-open fails to open file:// URLs with URL fragments
Summary: xdg-open fails to open file:// URLs with URL fragments
Status: RESOLVED DUPLICATE of bug 50715
Alias: None
Product: Portland
Classification: Unclassified
Component: xdg-utils (show other bugs)
Version: unspecified
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Portland Bugs
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-02-10 17:57 UTC by Alain Kalker
Modified: 2014-02-10 18:02 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Alain Kalker 2014-02-10 17:57:21 UTC
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.
Comment 1 Rex Dieter 2014-02-10 18:02:02 UTC

*** This bug has been marked as a duplicate of bug 50715 ***


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.