Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 310301

Summary: x11-misc/xdg-utils: xdg-open ignores PATH order
Product: Gentoo Linux Reporter: Erik Boritsch <borych>
Component: Current packagesAssignee: Freedesktop bugs <freedesktop-bugs>
Status: RESOLVED WORKSFORME    
Severity: normal CC: notordoktor
Priority: High    
Version: unspecified   
Hardware: x86   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Erik Boritsch 2010-03-19 23:23:16 UTC
I have /usr/local/bin before /usr/bin in my PATH, but if I use xdg to start a .desktop file with e.g. Exec=firefox, it starts /usr/bin/firefox instead of /usr/local/bin/firefox
kfmclient exec somefile.desktop does the same thing, I have to explicitely put /usr/local/bin/ to Exec section of .desktop file to make programs in /usr/local/bin work.

Reproducible: Always

Steps to Reproduce:
1. # ln -sf /usr/bin/konqueror /usr/local/bin/firefox
2. create firefox.desktop file with "Exec=firefox" in it
3. $ xdg-open firefox.desktop

Actual Results:  
Firefox starts

Expected Results:  
konqueror starts because /usr/local/bin/firefox is a link to konqueror and /usr/local/bin is before /usr/bin in PATH

$ echo $PATH
/usr/local/bin:/usr/bin:/bin:/opt/bin:/usr/i686-pc-linux-gnu/gcc-bin/4.3.4:/usr/qt/3/bin:/usr/games/bin
Comment 1 Doktor Notor 2010-03-20 00:16:10 UTC
I'm afraid you misunderstood the purpose of xdg-open. 

DESCRIPTION
dg-open opens a file or URL in the user's preferred application. If a URL is provided the URL will be opened in the user's preferred web browser. If a file is provided the file will be opened in the preferred application for files of that type. xdg-open supports file, ftp, http and https URLs.

xdg-open is for use inside a desktop session only. It is not recommended to use xdg-open as root.