![]() Used if no kitty -password-file is supplied. The name of an environment variable to read the password from. Defaults to checking for the rc-pass file in the kitty configuration directory. Relative paths are resolved from the kitty configuration directory. password-file #Ī file from which to read the password. This will cause kitty to ask the user for permission to perform the specified action, unless the password has been accepted before or is pre-configured in nf. password #Ī password to use when contacting kitty. they will only work if this process is run within a kitty window. If that is also not found, messages are sent to the controlling terminal for this process, i.e. If not specified, the environment variable KITTY_LISTEN_ON is checked. Corresponds to the address given to the kitty instance via the kitty -listen-on option or the listen_on setting in nf. Options # -to #Īn address for the kitty instance to control. Set the allow_remote_control option in nf or use a password, for this to work. For example:Ĭontrol kitty by sending it commands. If you wish to trigger a remote control command easily with just a keypress, get ( 'copy_env' ): return False # prints in this function go to the parent kitty process STDOUT print ( 'Allowing launch command:', cmd_payload ) return True Mapping key presses to remote control commands # if cmd_name != 'launch' : return None if cmd_payload. Below is an example of # restricting the launch command to allow only running the # default shell. # The command payload will vary from command to command, see # the rc protocol docs for details. Return None to have no # effect on the command. To do so create a file in the kitty configurationĭirectory, ~/.config/kitty/my_rc_auth.py and add the followingĭef is_cmd_allowed ( pcmd, window, from_socket, extra_data ): cmd_name = pcmd # the name of the command cmd_payload = pcmd # the arguments to the command # examine the cmd_name and cmd_payload and return True to allow # the command or False to disallow it. You can define your own Python script to examine every remote control commandĪnd allow/disallow it. If the ability to control access by action names is not fine grained enough, Customizing authorization with your own program # Kitty uses a time based nonce to minimise the potential for replay attacks. System must match (within a few minutes) the clock on the local system. Which transmits large amounts of image data. ThisĬan be noticeable when using a command like kitty set-background-image Is slower as the entire command is encrypted before transmission. This does mean that using password based authentication Using a password, Encrypted communication is used to ensure the password Ssh kitten does this for you automatically. KITTY_PUBLIC_KEY environment variable to the remote host. Remote control via a socket #įor password based authentication to work over SSH, you must pass the Simpler kitty -single-instance option, see kitty -help for that. Subsequent kitty invocations appear as new top-level windows, you can use the Note that if all you want to do is run a single kitty “daemon” and have Inside a kitty window, see the section on using a socket for remote control If you want to control kitty from programs/scripts not running In the example’s above, kitty messaging works only when run This tutorial touches only the surface of what is possible. Use this information with kitty focus-window -match to controlĪs you can see, it is very easy to control kitty using the kitty system. Process id (PID) and command-line of the process running in the window. ![]() Each window has an id, title, current working directory, Each tab has its own id, a title and a list of kitty This outputs a tree of data in JSON format.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |