[Portland-bugs] [Bug 74804] New: xdg-open fails to open file:// URLs with URL fragments

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Mon Feb 10 09:57:21 PST 2014


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

          Priority: medium
            Bug ID: 74804
          Assignee: portland-bugs at lists.freedesktop.org
           Summary: xdg-open fails to open file:// URLs with URL fragments
          Severity: normal
    Classification: Unclassified
                OS: Linux (All)
          Reporter: a.c.kalker at gmail.com
          Hardware: x86-64 (AMD64)
            Status: NEW
           Version: unspecified
         Component: xdg-utils
           Product: Portland

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.

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


More information about the Portland-bugs mailing list