Bug 755553 - xdg-open: x-www-browser: command not found
Summary: xdg-open: x-www-browser: command not found
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: xdg-utils
Version: 16
Hardware: x86_64
OS: Unspecified
unspecified
medium
Target Milestone: ---
Assignee: Rex Dieter
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-11-21 13:21 UTC by Mariusz Wodzicki
Modified: 2018-09-30 04:06 UTC (History)
4 users (show)

Fixed In Version: xdg-utils-1.1.0-0.10.20111207.fc15
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-12-22 22:37:03 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Mariusz Wodzicki 2011-11-21 13:21:33 UTC
Description of problem: Executing xdg-open with URI as its argument throws up the error message:

/usr/bin/xdg-open: line 584: x-www-browser: command not found

Version-Release number of selected component (if applicable):
xdg-utils-1.1.0-0.9.20110714.fc16.noarch

How reproducible: ALWAYS


Steps to Reproduce:
1. xdg-open http://google.com (or any other URI)
2.
3.
  
Actual results: on my computer it always throws up the error message

/usr/bin/xdg-open: line 584: x-www-browser: command not found

and opens the desired URI in firefox


Expected results:

either Fedora should set the value of x-www-browser , or the code of /usr/bin/xdg-open should be appropriately modified.

Additional info:

Comment 1 Rex Dieter 2011-11-21 15:31:46 UTC
What Desktop Environment (if any) are you using?

Comment 2 Rex Dieter 2011-11-21 15:34:08 UTC
I guess it doesn't matter, I just need to supress the error output from searching-for (and not finding) anything matching x-www-browser

Comment 3 Mariusz Wodzicki 2011-11-21 15:52:16 UTC
I use GNOME 3, fluxbox, and a few months ago I was frequently using Openbox. These three are the only desktop environments I have installed on the computer where I noticed the problem: the reported behavior I noticed when I was logged into a fluxbox session.

Comment 4 Fedora Update System 2011-12-07 18:57:04 UTC
xdg-utils-1.1.0-0.10.20111207.fc16 has been submitted as an update for Fedora 16.
https://admin.fedoraproject.org/updates/xdg-utils-1.1.0-0.10.20111207.fc16

Comment 5 Fedora Update System 2011-12-07 19:18:40 UTC
xdg-utils-1.1.0-0.10.20111207.fc15 has been submitted as an update for Fedora 15.
https://admin.fedoraproject.org/updates/xdg-utils-1.1.0-0.10.20111207.fc15

Comment 6 Fedora Update System 2011-12-10 19:38:06 UTC
Package xdg-utils-1.1.0-0.10.20111207.fc16:
* should fix your issue,
* was pushed to the Fedora 16 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing xdg-utils-1.1.0-0.10.20111207.fc16'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2011-16850/xdg-utils-1.1.0-0.10.20111207.fc16
then log in and leave karma (feedback).

Comment 7 Fedora Update System 2011-12-22 22:37:03 UTC
xdg-utils-1.1.0-0.10.20111207.fc16 has been pushed to the Fedora 16 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 8 Fedora Update System 2011-12-27 22:58:55 UTC
xdg-utils-1.1.0-0.10.20111207.fc15 has been pushed to the Fedora 15 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 9 antofthy 2017-12-14 04:54:00 UTC
As a FYI to people seeing this.

xdg-open is purely a shell script wrapper to try and find an appropriate application to view or execute the given file or URL, according to what applications are installed and running.

You typically get the error "x-www-browser: command not found" because.

1/ It was unable to determine your environment, or in the case of gnome, the environment changed.

2/ You did not set a "BROWSER" environment variable, to define an appropriate
default launched when it was unable to figure out what to run!

When these to conditions are not met, it will typically use a built in default
which consists of...
  x-www-browser:firefox:iceweasel:seamonkey:mozilla:epiphany:konqueror:chromium-browser:google-chrome:www-browser:links2:elinks:links:lynx:w3m

and will try each of those application until something runs.  And it does so in a real "Brain Dead" manner, and is becoming dated.

Note:  x-www-browser  generally does not exist, so if you make a script called "x-www-browser", then that will be called to handle things

Note 2: the second entry is "firefox" which may or may not be your primary application of choice.



SOLUTIONS:
  1/  Make a "x-www-browser"  script that executes your desired web browser
OR more appropriate "open" comamnd,  such as  "gvfs-open" (gnome v3) or "exo-open" (xfce)  or "kde-open"  (kde)

  2/ Define a "BROWSER" environment variable with a list of browsers, and open commands you would like it to try.  For example add to your ".bashrc" file

export BROWSER="google-chrome:gvfs-open:exo-open:kde-open"

The order should be your preference.



Better still  "xdg-open"  script should be fixed and updated so as to
1/ change the command exists before trying it
2/ have better defaults!


Note You need to log in before you can comment on or make changes to this bug.