--- a/eric6/Globals/__init__.py Sat Feb 20 14:53:33 2021 +0100 +++ b/eric6/Globals/__init__.py Sun Feb 21 12:28:58 2021 +0100 @@ -164,7 +164,7 @@ if not isLinuxPlatform(): return "" - sessionType = os.environ.get("XDG_SESSION_TYPE").lower() + sessionType = os.environ.get("XDG_SESSION_TYPE", "").lower() if "x11" in sessionType: return "X11" elif "wayland" in sessionType: