From e7e617959ce06175e074f55754143c4836ba6dfc Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 31 Jul 2026 00:47:54 -0400 Subject: [PATCH] Update pushbutton.py use Popen to run ttyd in background --- pushbutton.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pushbutton.py b/pushbutton.py index 65f6218f..03fcac50 100644 --- a/pushbutton.py +++ b/pushbutton.py @@ -150,8 +150,7 @@ if not GPIO.input(push_button): # if pushbutton is held down during boot result = subprocess.run(['nmcli', 'connection', 'show'], capture_output=True, text=True) print(result, flush=True) sleep(2) - result = subprocess.run(['ttyd', '-p', '8080', 'bash', '&'], capture_output=True, text=True) - print(result, flush=True) + subprocess.Popen(['sudo', '-u', 'pi', 'ttyd', '-p', '8080', 'bash']) GPIO.setup(powerPin, GPIO.OUT) GPIO.output(powerPin, 1)