Dont set KITTY_LISTEN_ON for windows with --allow-remote-control
This commit is contained in:
parent
6961845167
commit
18bf76d49e
@ -224,8 +224,10 @@ class Child:
|
||||
env: Optional[Dict[str, str]] = None,
|
||||
cwd_from: Optional['CwdRequest'] = None,
|
||||
is_clone_launch: str = '',
|
||||
add_listen_on_env_var: bool = True,
|
||||
):
|
||||
self.is_clone_launch = is_clone_launch
|
||||
self.add_listen_on_env_var = add_listen_on_env_var
|
||||
self.argv = list(argv)
|
||||
if cwd_from:
|
||||
try:
|
||||
@ -250,7 +252,7 @@ class Child:
|
||||
env['COLORTERM'] = 'truecolor'
|
||||
env['KITTY_PID'] = getpid()
|
||||
env['KITTY_PUBLIC_KEY'] = boss.encryption_public_key
|
||||
if boss.listening_on:
|
||||
if self.add_listen_on_env_var and boss.listening_on:
|
||||
env['KITTY_LISTEN_ON'] = boss.listening_on
|
||||
else:
|
||||
env.pop('KITTY_LISTEN_ON', None)
|
||||
|
||||
@ -367,6 +367,7 @@ class Tab: # {{{
|
||||
cwd: Optional[str] = None,
|
||||
env: Optional[Dict[str, str]] = None,
|
||||
is_clone_launch: str = '',
|
||||
add_listen_on_env_var: bool = True,
|
||||
) -> Child:
|
||||
check_for_suitability = True
|
||||
if cmd is None:
|
||||
@ -415,7 +416,7 @@ class Tab: # {{{
|
||||
pwid = platform_window_id(self.os_window_id)
|
||||
if pwid is not None:
|
||||
fenv['WINDOWID'] = str(pwid)
|
||||
ans = Child(cmd, cwd or self.cwd, stdin, fenv, cwd_from, is_clone_launch=is_clone_launch)
|
||||
ans = Child(cmd, cwd or self.cwd, stdin, fenv, cwd_from, is_clone_launch=is_clone_launch, add_listen_on_env_var=add_listen_on_env_var)
|
||||
ans.fork()
|
||||
return ans
|
||||
|
||||
@ -445,7 +446,7 @@ class Tab: # {{{
|
||||
) -> Window:
|
||||
child = self.launch_child(
|
||||
use_shell=use_shell, cmd=cmd, stdin=stdin, cwd_from=cwd_from, cwd=cwd, env=env,
|
||||
is_clone_launch=is_clone_launch
|
||||
is_clone_launch=is_clone_launch, add_listen_on_env_var=not allow_remote_control
|
||||
)
|
||||
window = Window(
|
||||
self, child, self.args, override_title=override_title,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user