diff options
author | Simon McVittie <smcv@debian.org> | 2022-01-05 11:53:23 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-05 11:53:23 (GMT) |
commit | dd50316e458d7c3284f8948b0606d8aa91ab855d (patch) | |
tree | 8df19c90d249559326ab532a1c9c422a4b6bf326 | |
parent | 332e6b972567debfa9d8f3f9a4a966c7ad15eec9 (diff) | |
download | cpython-dd50316e458d7c3284f8948b0606d8aa91ab855d.zip cpython-dd50316e458d7c3284f8948b0606d8aa91ab855d.tar.gz cpython-dd50316e458d7c3284f8948b0606d8aa91ab855d.tar.bz2 |
bpo-43137: Revert "webbrowser: Don't run gvfs-open on GNOME" (GH-30417)
gvfs-open was deprecated in 2015 and removed in 2018, but its replacement,
gio(1), is not available in Ubuntu 16.04, which is apparently still
supported by CPython upstream even though it is considered to be EOL by
Ubuntu developers.
Signed-off-by: Simon McVittie <smcv@debian.org>
-rwxr-xr-x | Lib/webbrowser.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/webbrowser.py b/Lib/webbrowser.py index 02d2036..44974d4 100755 --- a/Lib/webbrowser.py +++ b/Lib/webbrowser.py @@ -467,6 +467,10 @@ def register_X_browsers(): if shutil.which("gio"): register("gio", None, BackgroundBrowser(["gio", "open", "--", "%s"])) + # Equivalent of gio open before 2015 + if "GNOME_DESKTOP_SESSION_ID" in os.environ and shutil.which("gvfs-open"): + register("gvfs-open", None, BackgroundBrowser("gvfs-open")) + # The default KDE browser if "KDE_FULL_SESSION" in os.environ and shutil.which("kfmclient"): register("kfmclient", Konqueror, Konqueror("kfmclient")) |