Summary: | xdg-open fails to open a url in a "generic" environment | ||
---|---|---|---|
Product: | Portland | Reporter: | Göran Uddeborg <goeran> |
Component: | xdg-utils | Assignee: | Portland Bugs <portland-bugs> |
Status: | RESOLVED FIXED | QA Contact: | |
Severity: | normal | ||
Priority: | medium | CC: | freedesktop.zen.ssokolow, leho, mateusz |
Version: | 1.1.0 | Keywords: | patch |
Hardware: | Other | ||
OS: | All | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Attachments: |
Complete log generated with bash -xv xdg-open URL
Solution by David Costa in form of patch |
Description
Göran Uddeborg
2012-02-09 14:25:56 UTC
Created attachment 63106 [details] Complete log generated with bash -xv xdg-open URL I can confirm this bug on Arch Linux (up-to-date). Here is relevant part of my output generated for: bash -xv xdg-open "http://www.gnu.org" + IFS=: + for browser in '$BROWSER' + '[' xx-www-browser '!=' x ']' printf "$browser" "$1" 2>/dev/null ++ printf x-www-browser http://www.gnu.org + browser_with_arg=x-www-browser + '[' 0 -ne 0 ']' + '[' xx-www-browser = xx-www-browser ']' + eval '$browser $1 > /dev/null 2> /dev/null' $browser $1 > /dev/null 2> /dev/null ++ x-www-browser http //www.gnu.org + '[' 127 -eq 0 ']' + for browser in '$BROWSER' + '[' xfirefox '!=' x ']' printf "$browser" "$1" 2>/dev/null ++ printf firefox http://www.gnu.org + browser_with_arg=firefox + '[' 0 -ne 0 ']' + '[' xfirefox = xfirefox ']' + eval '$browser $1 > /dev/null 2> /dev/null' $browser $1 > /dev/null 2> /dev/null ++ firefox http //www.gnu.org Notice the URL split into "http" and "//www.gnu.org" parts. Complete log attached. My environment: mloskot ~ $ uname -a Linux dog 3.4.2-2-ARCH #1 SMP PREEMPT Mon Jun 11 22:27:17 CEST 2012 x86_64 GNU/Linux mloskot ~ $ firefox -v Mozilla Firefox 13.0.1 mloskot ~ $ xdg-open --version xdg-open 1.1.0 rc1 The eval parameter on line 659 is not quoted. The original line is: eval '$browser $1'$xdg_redirect_output; while it should be: eval '$browser "$1"'$xdg_redirect_output; Tested and working on xdg-open 1.1.0 rc1 on Arch Linux (up to date) with Mozilla Firefox 13.0.1 (In reply to comment #2) > while it should be: > eval '$browser "$1"'$xdg_redirect_output; I also can confirm it fixes the problem. Created attachment 65338 [details] [review] Solution by David Costa in form of patch I also confirm that bug exists in xdg-open 1.1.0 rc1 and that quoting $1 on line 659 fixes it. Please, apply the patch. Thanks David Costa. Fix applied, thanks! http://cgit.freedesktop.org/xdg/xdg-utils/commit/?id=d1cb061c85388cb9e87a3ea902061d7b94726971 *** Bug 44164 has been marked as a duplicate of this bug. *** |
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.