From 1f5bfb371f8051393baa46839362534a159dbd6d Mon Sep 17 00:00:00 2001 From: alfrix Date: Wed, 1 Nov 2023 16:43:54 -0300 Subject: [PATCH] Revert "screen: detect Desktop environment" This reverts commit d5ec79e2efebf50b7e7e71e7656cde33ca8019be. --- ks_includes/functions.py | 10 ---------- screen.py | 1 - 2 files changed, 11 deletions(-) diff --git a/ks_includes/functions.py b/ks_includes/functions.py index 6a272f79..d0e906d2 100644 --- a/ks_includes/functions.py +++ b/ks_includes/functions.py @@ -184,13 +184,3 @@ def setup_logging(log_file, software_version): logging.captureWarnings(True) return listener, fh - - -def detect_desktop_environment(): - try: - env = os.environ['XDG_CURRENT_DESKTOP'] - logging.info(f"Session type: {os.environ['XDG_SESSION_TYPE']} DE: {env}") - if os.environ['XDG_CURRENT_DESKTOP']: - logging.warning("WARNING: Running inside a DE is not supported, and may lead to into problems") - except Exception as e: - logging.exception(f"Error:\n{e}\n\n{traceback.format_exc()}") diff --git a/screen.py b/screen.py index 4c4273c8..65afcc5e 100755 --- a/screen.py +++ b/screen.py @@ -1070,7 +1070,6 @@ def main(): functions.patch_threading_excepthook() logging.info(f"Python version: {sys.version_info.major}.{sys.version_info.minor}") logging.info(f"KlipperScreen version: {version}") - functions.detect_desktop_environment() if not Gtk.init_check(): logging.critical("Failed to initialize Gtk") raise RuntimeError