Bug 14374 (JoyFM)

Summary: xdg-open fails if $BROWSER has arguments
Product: Portland Reporter: Johannes <ih-mon>
Component: xdg-utilsAssignee: Fathi Boudra <fabo>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: medium    
Version: 1.0   
Hardware: x86 (IA32)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments: browser_with_args.diff

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.