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.

classification
Title: webbrowser.open_new() suggestion
Type: enhancement Stage:
Components: None Versions:
process
Status: closed Resolution: works for me
Dependencies: Superseder:
Assigned To: georg.brandl Nosy List: georg.brandl, imi1984, mark-roberts
Priority: normal Keywords:

Created on 2006-12-30 00:03 by imi1984, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (3)
msg54956 - (view) Author: Imre Péntek (imi1984) Date: 2006-12-30 00:03
Hello,

under Linux if I use
webbrowser.open_new('...') a konqueror gets invoked. At the time when invoking konqueror (maybe you probe first, but anyways) you assume that user has a properly installed kde. But if you assume the user has a properly installed KDE you have a better opportunity to open a webpage, even in the browser preferred by the user -- no matter really what it is. Try this one:
kfmclient exec http://sourceforge.net/
using this one the client associated with .html in kcontrol gets invoked.
I suppose that (becouse of the ability to customize the browser) this way would be better if available than guessing which browser would the user prefer.
msg54957 - (view) Author: Mark Roberts (mark-roberts) Date: 2007-01-14 23:08
A quick look at the code makes me think that it does try to run kfmclient first.  Specifically, line 351 of webbrowser.py tries kfmclient, while like line 363 of webbrowser.py opens konqueror.

I don't really run KDE, Gnome, or Windows, so I'm not a lot of help for testing this for you.  I can, however, tell you that it does the "right thing" for me, in that it opens Firefox.  When I did Python development on Windows, it also "did the right thing" there.
msg55158 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2007-08-23 16:51
webbrowser uses the default GNOME browser if a GNOME session is running
and kfmclient if a KDE session is running. Closing as "works for me".
History
Date User Action Args
2022-04-11 14:56:21adminsetgithub: 44387
2007-08-23 16:51:05georg.brandlsetstatus: open -> closed
resolution: works for me
messages: + msg55158
2006-12-30 00:03:18imi1984create