Closed Jomik closed 5 years ago
That indicates kitty is not running kittens but instead trying to open a new window with +whatever as the program to run in it. Which will happen only if you are running a very old kitty or you have one somewhere in your path or the command line arguments being passed to kitty are incorrect.
@kovidgoyal so, I am running latest release, 0.13.3, and I only have that kitty in my path. I am pretty certain it is a bit with my installation, as I use Nix.. But I would like to debug it, I just can't seem to get a more useful error message. Is there a way I can see what exact path it is trying to execute?
It tells you exactly what it is executing, in this case +whatever.
If you want to debug, look in the main() function in main.py that is where it decides whether to run kitty itself or a kitten or remote control, etc.
@kovidgoyal I used strace -vfefile kitty list-fonts
and it looks like it is using for a list-fonts
executable in my PATH. And when I do kitty +kititen ssh
it seems to look for a +kitten
program in my PATH.
That is what I told you in my previous comment.
Solved it. The error was that I had kitty linked to a script that looks like
#!/usr/bin/env bash
export PATH='/nix/store/kitty-0.13.3/bin:/nix/store/imagemagick-6.9.9-34/bin:/nix/store/xsel-unstable-2018-01-10/bin'${PATH:+':'}$PATH
exec -a "$0" "/nix/store/kitty-0.13.3/bin/.kitty-wrapped" --config /nix/store/kitty.conf "${extraFlagsArray[@]}" "$@"
I removed the --config
flag and just set the KITTY_CONFIG_DIR
environment variable instead.
Seems there is a bug if you call kitty
with --config
and then try to launch any child, unless that is just not supported.
--config is a commnd line option for kitty, not for kittens, which have their own unique set of command line arguments. Indeed, some of them have their own different config files. You cannot pass the kittyconfig arg to kittens, only to kitty itself.
@kovidgoyal The --config
option is being passed to kitty
, not a kitten.
When you run kitty +whatever you are running a kitten not kitty.
I ran kitty --config /my/config/dir/kitty.conf +kitten ssh myserver
..?
Either way, it does work now, by not using --config
, but the environment variable, so all is good :)
If you want to run a kitten you have to make + the first argument to kitty. If you put it after --config it will not work.
So when you do
kitty --config x +kitten ssh
you are telling kitty to run itself using the config file x and starting the program +kitten witht he arguments ssh
@kovidgoyal Ah, that does make sense. So I can not pass a configuration file to kitty, if I want to run a kitten. But I guess it does not actually make sense to pass a config file when starting a kitten! Thank you for clarifying! And thanks for the terminal, it's awesome :+1:
You're welcome :)
I want to launch a new kitty os window running the ssh kitten and pass some command line arguments to the containing kitty, so I came up with:
alias goto='kitty -o background_image=${bg_img} -o background_image_layout=scaled +kitten ssh $*'
$bg_img
is generated on the fly and is different for each host (it is an image of the hostname). Alas, the limitation of not being able to pass dynamic config to the kitty invocation when also launching a kitty gets in the way. The options parsing code is quite hairy but I think https://github.com/kovidgoyal/kitty/blob/master/kitty/cli.py#L514 is the condition that decides if we should go into "kitten mode" or proceed as normal.
if you want to run the ssh kitten inside a new kitty, you do this:
kitty --config whatever -o whatever -o whatever kitty +kitten ssh whatever
Apologies for the necro-bump, but not sure if a new issue is appropriate when the behaviour is intentional.
What behavior?? I showed you how to pass dynamic config to kitty when running a kitten inside a new kitty instance.
I posted that on a stale form that had not been refreshed. Your fix works, got lost in a maze of kitty invocations :)
I'm tring to install Kitty to pi and I get this popup. Failed to execute child process "/home/pi/.local/kitty.app/bin/kitty" (No such file or directory) it would be great to sort this out.
I get the following error trying to use
kitty +kitten ssh myserver
, and similar for+complete
and the likes. Evenkitty list-fonts
fails.The error is sadly not very helpful to me, I know my setup is non-standard, as I am on NixOS, but I don't know what it is looking for, so I can not fix/patch it.