From acc5655546dd6b439d8d38697e4bbad19b37137e 2018-09-07 10:53:52 From: Christoph Date: 2018-09-07 10:53:52 Subject: [PATCH] check also WAYLAND_DISPLAY --- diff --git a/IPython/terminal/pt_inputhooks/qt.py b/IPython/terminal/pt_inputhooks/qt.py index 58a5377..d2e23ab 100644 --- a/IPython/terminal/pt_inputhooks/qt.py +++ b/IPython/terminal/pt_inputhooks/qt.py @@ -13,8 +13,8 @@ def inputhook(context): if not app: if sys.platform == 'linux': try: - os.environ['DISPLAY'] # DISPLAY is set - assert os.environ['DISPLAY'] != '' # DISPLAY is not empty + # DISPLAY or WAYLAND_DISPLAY is set and not empty + assert os.environ.get('DISPLAY') or os.environ.get('WAYLAND_DISPLAY') except Exception: import warnings global _already_warned