summaryrefslogtreecommitdiffstats
path: root/Lib/webbrowser.py
diff options
context:
space:
mode:
authorMatthias Klose <doko@ubuntu.com>2012-04-04 12:19:04 (GMT)
committerMatthias Klose <doko@ubuntu.com>2012-04-04 12:19:04 (GMT)
commitda80b1eb2fa5db8a388fa202e6aada686d243842 (patch)
treeb52c29dfeccd2960c549370590c403aea1148944 /Lib/webbrowser.py
parent597e6b4cc5262b4c07a47da4d7421d51d609f470 (diff)
downloadcpython-da80b1eb2fa5db8a388fa202e6aada686d243842.zip
cpython-da80b1eb2fa5db8a388fa202e6aada686d243842.tar.gz
cpython-da80b1eb2fa5db8a388fa202e6aada686d243842.tar.bz2
- Issue #14493: Use gvfs-open/xdg-open in Lib/webbrowser.py.
Diffstat (limited to 'Lib/webbrowser.py')
-rw-r--r--Lib/webbrowser.py8
1 files changed, 8 insertions, 0 deletions
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"))