Bug 14374 (JoyFM) - xdg-open fails if $BROWSER has arguments
Summary: xdg-open fails if $BROWSER has arguments
Status: RESOLVED FIXED
Alias: JoyFM
Product: Portland
Classification: Unclassified
Component: xdg-utils (show other bugs)
Version: 1.0
Hardware: x86 (IA32) Linux (All)
: medium normal
Assignee: Fathi Boudra
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-02-04 14:47 UTC by Johannes
Modified: 2010-02-28 11:32 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
browser_with_args.diff (583 bytes, patch)
2010-02-28 06:48 UTC, Pablo Castellano (pablog)
Details | Splinter Review

Description Johannes 2008-02-04 14:47:12 UTC
Hi,
xdg-open fails on my system without a desktop environment.
so DE is setted to nothing and the generic function is executed.
my $BROWSER variable is set to "/usr/bin/opera -newpage %s"
it fails with following error : 
[johannes@ThinkpadT40Johannes ~]$xdg-open kernel.org
 /usr/bin/xdg-open: line 370: /usr/bin/opera -newpage kernel.org: No such file or directory

a fix i found with some other in the irc chanel on freenode is to add eval to line 370 wich means the following : 

instead of:

            if [ x"$browser_with_arg" = x"$browser" ]; then "$browser" "$1";
            else $browser_with_arg;
            fi

use :
            if [ x"$browser_with_arg" = x"$browser" ]; then "$browser" "$1";
            else eval $browser_with_arg;
            fi


i hope it will be included in the next version ;)
Comment 1 Pablo Castellano (pablog) 2010-02-28 06:48:21 UTC
Created attachment 33642 [details] [review]
browser_with_args.diff

I could reproduce this bug.
Patch that applies to latest version is attached.
Comment 2 Fathi Boudra 2010-02-28 11:32:21 UTC
fixed in cvs.


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.