This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author bingham
Recipients bingham
Date 2007-08-29.15:02:10
SpamBayes Score 0.050533
Marked as misclassified No
Message-id <>
Under Gnome, Firefox will open the wrong URL when launched by
webbrowser.  For example after running the following interactive session:

bingham@grizzly:~> python
Python 2.5.1 (r251:54863, Jun  6 2007, 13:42:30)
[GCC 4.1.2 20061115 (prerelease) (SUSE Linux)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import webbrowser

Firefox attempts to open the URL

This is caused by a bug in the Python standard library's webbrowser
module that only affects machines running Gnome.

On Gnome, webbrowser runs the command

gconftool-2 -g /desktop/gnome/url-handlers/http/command 2>/dev/null

to find the web browser, which prints out a browser command line like

/pkgs/Firefox/2.0/firefox "%s"

The quotes around "%s" are preserved when passing the command-line
arguments. The quotes prevent firefox from recognizing the URL and
firefox falls back to treating it as a file name. The webbrowser module
already handles extra quoting around the URL for the BROWSER environment
variable and this same treatment should be applied to the result of

The BROWSER environment variable issue, now fixed, is described at  The present issue was discussed in
an Ubuntu bug report
( but was
not resolved.
Date User Action Args
2007-08-29 15:02:11binghamsetspambayes_score: 0.050533 -> 0.050533
recipients: + bingham
2007-08-29 15:02:11binghamsetspambayes_score: 0.050533 -> 0.050533
messageid: <>
2007-08-29 15:02:11binghamlinkissue1057 messages
2007-08-29 15:02:10binghamcreate