diff --git a/kitty/boss.py b/kitty/boss.py index 998067410..366c75b05 100755 --- a/kitty/boss.py +++ b/kitty/boss.py @@ -162,7 +162,10 @@ class Boss: talk_fd = getattr(single_instance, 'socket', None) talk_fd = -1 if talk_fd is None else talk_fd.fileno() listen_fd = -1 - if args.listen_on and (opts.allow_remote_control in ('y', 'socket-only')): + # we dont allow reloading the config file to change + # allow_remote_control + self.allow_remote_control = opts.allow_remote_control + if args.listen_on and (self.allow_remote_control in ('y', 'socket-only')): listen_fd = listen_on(args.listen_on) self.child_monitor = ChildMonitor( self.on_child_death, @@ -362,7 +365,7 @@ class Boss: from .remote_control import handle_cmd response = None window = window or None - if get_options().allow_remote_control == 'y' or from_peer or getattr(window, 'allow_remote_control', False): + if self.allow_remote_control == 'y' or from_peer or getattr(window, 'allow_remote_control', False): try: response = handle_cmd(self, window, cmd) except Exception as err: diff --git a/kitty/options/definition.py b/kitty/options/definition.py index b5b04c660..610d5abb6 100644 --- a/kitty/options/definition.py +++ b/kitty/options/definition.py @@ -2470,8 +2470,7 @@ running within kitty to control it, with :code:`yes` or only programs that connect to the socket specified with the :option:`kitty --listen-on` command line option, if you use the value :code:`socket-only`. The latter is useful if you want to prevent programs running on a remote computer over ssh from -controlling kitty. Changing this option by reloading the config will only affect -newly created windows. +controlling kitty. Reloading the config will not affect this setting. ''' )