New submission from Jeremy Attali <jeremy.att...@gmail.com>:

In a pure Wayland environment (without xwayland), the DISPLAY environment 
variable is not present. Therefore the call to `xdg-settings get 
default-browser` is not made. So the webbrowser behaviour is different between 
X11 and Wayland environment. I'm working on a fix, should submit a GitHub PR 
soon.

```
❯ export | grep DISPLAY
WAYLAND_DISPLAY=wayland-0
❯ python -c "import webbrowser; print(webbrowser.get())"
<webbrowser.GenericBrowser object at 0x7f6f1b755160>
```

----------
components: Library (Lib)
messages: 369872
nosy: Jeremy Attali
priority: normal
severity: normal
status: open
title: Allow pure Wayland to get default XDG webbrowser
type: behavior
versions: Python 3.10, Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 
3.9

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue40767>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to