From 4d161caa6d7b245de059413fbf3e29552ee23633 Mon Sep 17 00:00:00 2001 From: "Tanner Collin (aider)" Date: Tue, 17 Jun 2025 19:22:59 -0600 Subject: [PATCH] feat: add function to cast to Thunder --- main.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/main.py b/main.py index c92d72c..b0cb6e9 100644 --- a/main.py +++ b/main.py @@ -25,6 +25,18 @@ def cast_trotec(): except FileNotFoundError: logging.error(f"Command not found: xtightvncviewer. Please ensure it is installed and in PATH.") +def cast_thunder(): + """Executes the xtightvncviewer command for Thunder.""" + command = "DISPLAY=:1 xtightvncviewer -viewonly -fullscreen 172.17.17.215" + try: + logging.info(f"Executing command: {command}") + subprocess.run(command, shell=True, check=True) + logging.info("Command executed successfully.") + except subprocess.CalledProcessError as e: + logging.error(f"Command failed with error: {e}") + except FileNotFoundError: + logging.error(f"Command not found: xtightvncviewer. Please ensure it is installed and in PATH.") + def main(): app.run(debug=DEBUG, host='0.0.0.0', port=int(os.environ.get('PORT', 5000)))