From da80b1eb2fa5db8a388fa202e6aada686d243842 Mon Sep 17 00:00:00 2001 From: Matthias Klose Date: Wed, 4 Apr 2012 14:19:04 +0200 Subject: - Issue #14493: Use gvfs-open/xdg-open in Lib/webbrowser.py. --- Lib/webbrowser.py | 8 ++++++++ Misc/NEWS | 2 ++ 2 files changed, 10 insertions(+) diff --git a/Lib/webbrowser.py b/Lib/webbrowser.py index d036355..5b441e6 100644 --- a/Lib/webbrowser.py +++ b/Lib/webbrowser.py @@ -448,6 +448,14 @@ class Grail(BaseBrowser): def register_X_browsers(): + # use xdg-open if around + if _iscommand("xdg-open"): + register("xdg-open", None, BackgroundBrowser("xdg-open")) + + # The default GNOME3 browser + if "GNOME_DESKTOP_SESSION_ID" in os.environ and _iscommand("gvfs-open"): + register("gvfs-open", None, BackgroundBrowser("gvfs-open")) + # The default GNOME browser if "GNOME_DESKTOP_SESSION_ID" in os.environ and _iscommand("gnome-open"): register("gnome-open", None, BackgroundBrowser("gnome-open")) diff --git a/Misc/NEWS b/Misc/NEWS index 0c3438a..723e6ff 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -29,6 +29,8 @@ Library a multiprocessing Client or Listener with an AF_PIPE type address under non-Windows platforms. Patch by Popa Claudiu. +- Issue #14493: Use gvfs-open/xdg-open in Lib/webbrowser.py. + What's New in Python 3.3.0 Alpha 2? =================================== -- cgit v0.12