From 909671f5082c466586fee9a7fb33ee529d2e8d1a Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 22 Jun 2025 09:26:54 +0530 Subject: [PATCH] Nicer error message when user tries to run kitten with allow_remote_control from command line --- kittens/tui/handler.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/kittens/tui/handler.py b/kittens/tui/handler.py index c7a629fba..9f271a636 100644 --- a/kittens/tui/handler.py +++ b/kittens/tui/handler.py @@ -70,6 +70,8 @@ class KittenUI: return if self.allow_remote_control: self.to = os.environ.get('KITTY_LISTEN_ON', '') + if not self.to: + raise ValueError('Remote control not enabled, this kitten should be run via a map in kitty.conf, not from the command line') self.rc_fd = int(self.to.partition(':')[-1]) os.set_inheritable(self.rc_fd, False) if (self.remote_control_password or self.remote_control_password == '') and not self.password: