Allow listen_on to be used even without allow_remote_control

Since we intend to allow password based access, which works regardless
of the value of allow_remote_control
This commit is contained in:
Kovid Goyal 2022-08-09 20:39:10 +05:30
parent 1a643441f3
commit c7e3c92a0a
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
4 changed files with 4 additions and 7 deletions

View File

@ -256,7 +256,7 @@ class Boss:
# 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')):
if args.listen_on:
listen_fd = listen_on(args.listen_on)
self.prewarm = prewarm
self.child_monitor = ChildMonitor(

View File

@ -684,9 +684,7 @@ also use abstract UNIX sockets, not associated with a file, like this:
expanded and relative paths are resolved with respect to the temporary
directory. To control kitty, you can send commands to it with
:italic:`{appname} @` using the :option:`{appname} @ --to` option to specify
this address. Unless you enabled :opt:`allow_remote_control` in
:file:`{conf_name}.conf`, this option will be ignored. Note that if you run
:italic:`{appname} @` within a kitty window, there is
this address. Note that if you run :italic:`{appname} @` within a kitty window, there is
no need to specify the :option:`{appname} @ --to` option as it will
automatically read from the environment. For UNIX sockets, this can also be
specified in :file:`{conf_name}.conf`.

View File

@ -324,7 +324,7 @@ def setup_environment(opts: Options, cli_opts: CLIOptions) -> None:
if not cli_opts.listen_on and opts.listen_on.startswith('unix:'):
cli_opts.listen_on = opts.listen_on
from_config_file = True
if cli_opts.listen_on and opts.allow_remote_control != 'n':
if cli_opts.listen_on:
cli_opts.listen_on = expand_listen_on(cli_opts.listen_on, from_config_file)
os.environ['KITTY_LISTEN_ON'] = cli_opts.listen_on
env = opts.env.copy()

View File

@ -2739,8 +2739,7 @@ socket. This option accepts only UNIX sockets, such as
variables are expanded and relative paths are resolved with respect to the
temporary directory. If :code:`{kitty_pid}` is present, then it is replaced
by the PID of the kitty process, otherwise the PID of the kitty process is
appended to the value, with a hyphen. This option is ignored unless you also set
:opt:`allow_remote_control` to enable remote control. See the help for
appended to the value, with a hyphen. See the help for
:option:`kitty --listen-on` for more details. Changing this option by reloading
the config is not supported.
'''