From: Stefano Rivera Date: Sat, 7 Oct 2017 09:38:58 +0200 Subject: Use xdg-open/gvfs-open in webbrowser Bug-cpython: http://bugs.python.org/issue14493 Bug-Ubuntu: https://bugs.launchpad.net/bugs/971311 Origin: cpython, http://hg.python.org/cpython/rev/70c58903b52e Author: Michael Vogt --- lib-python/2.7/webbrowser.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib-python/2.7/webbrowser.py b/lib-python/2.7/webbrowser.py index 2389179..645b3e1 100755 --- a/lib-python/2.7/webbrowser.py +++ b/lib-python/2.7/webbrowser.py @@ -453,6 +453,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")) + # use xdg-open if around if _iscommand("xdg-open"): register("xdg-open", None, BackgroundBrowser("xdg-open"))