Bugs item #1681228, was opened at 2007-03-15 08:03 Message generated for change (Comment added) made by gbrandl You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1681228&group_id=5470
Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Python Library Group: Python 2.5 >Status: Closed >Resolution: Accepted Priority: 5 Private: No Submitted By: Lukas Lalinsky (luks) Assigned to: Nobody/Anonymous (nobody) Summary: webbrowser priorities Initial Comment: Recently I've run into a Windows-specific bug in webbrowser (using close_fds and preexec_fn in subprocess.Popen), and I noticed there are some strange priorities in the default browsers. For example: * Why is firefox, firebird, seamonkey, mozilla, netscape and opera preferred over the *user's* preferred browser on Windows? * Why is the GNOME default browser preferred even if the user is currently running KDE (but has GNOME installed)? >From all the platforms, only on Mac OS X it really respects the user's >preferrencies. I'd like to propose this: * On Windows, make "windows-default" the first in _try_order * If the user is running GNOME ("GNOME_DESKTOP_SESSION_ID" in os.environ) and command "gnome-open" exists, use `gnome-open '%s'`. * If the user is running KDE (os.environ.get("KDE_FULL_SESSION") == "true") and command "kfmclient" exists, use `kfmclient exec '%s'`. ---------------------------------------------------------------------- >Comment By: Georg Brandl (gbrandl) Date: 2007-03-16 07:55 Message: Logged In: YES user_id=849994 Originator: NO Committed in rev. 54406. ---------------------------------------------------------------------- Comment By: Lukas Lalinsky (luks) Date: 2007-03-15 11:47 Message: Logged In: YES user_id=587716 Originator: YES Ok, here is the patch, including the fix for #1681248. The priorities on all platforms with this patch are: 1. The BROWSER environment variable overrides everything 2. Next step is to check the preferred browsers for desktop environments (Windows, Mac OS X, GNOME and KDE) 3. Fallback to available installed browsers (firefox, opera, konqueror, epiphany, ...) File Added: webbrowser-defaults.diff ---------------------------------------------------------------------- Comment By: Georg Brandl (gbrandl) Date: 2007-03-15 08:50 Message: Logged In: YES user_id=849994 Originator: NO I agree with your suggestion. Can you make a patch (and include a fix for the other bug you filed)? ---------------------------------------------------------------------- Comment By: Lukas Lalinsky (luks) Date: 2007-03-15 08:06 Message: Logged In: YES user_id=587716 Originator: YES Just a note, if you agree with this behavior, I'll be more than happy to make a patch. Currently I'm using similar mechanism in my own code (because Python's lib in 2.4 doesn't respect GNOME/KDE settings at all), so I can easily turn it into a patch. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1681228&group_id=5470 _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com