kovidgoyal/kitty · critical
Failed to find the kitty executable, this kitten requires th
Error message
Failed to find the kitty executable, this kitten requires the kitty executable to be present. You can use the environment variable KITTY_PATH_TO_KITTY_EXE to specify the path to the kitty executable
What it means
The choose-fonts kitten needs a kitty executable to launch its font-backend subprocess ('kitty +runpy ...') and could not find one: KITTY_PATH_TO_KITTY_EXE is unset, utils.KittyExe() returned empty, and 'kitty' is not on PATH.
Source
Thrown at kittens/choose_fonts/backend.go:38
to io.WriteCloser
json_decoder *json.Decoder
cmd *exec.Cmd
stderr strings.Builder
lock sync.Mutex
r io.ReadCloser
w io.WriteCloser
wait_for_exit chan error
started, exited, failed bool
timeout time.Duration
}
func (k *kitty_font_backend_type) start() (err error) {
exe := utils.KittyExe()
if exe == "" {
exe = utils.Which("kitty")
}
if exe == "" {
return fmt.Errorf("Failed to find the kitty executable, this kitten requires the kitty executable to be present. You can use the environment variable KITTY_PATH_TO_KITTY_EXE to specify the path to the kitty executable")
}
k.cmd = exec.Command(exe, "+runpy", "from kittens.choose_fonts.backend import main; main()")
k.cmd.Stderr = &k.stderr
if k.r, k.to, err = os.Pipe(); err != nil {
return err
}
k.cmd.Stdin = k.r
if k.from, k.w, err = os.Pipe(); err != nil {
return err
}
k.cmd.Stdout = k.w
k.json_decoder = json.NewDecoder(k.from)
if err = k.cmd.Start(); err != nil {
return err
}
k.started = trueView on GitHub (pinned to 6d5d0c4406)
Solutions
- Set KITTY_PATH_TO_KITTY_EXE to the full path of the kitty binary
- Ensure 'kitty' is on PATH (symlink or add install dir to PATH)
- Reinstall/locate kitty: 'which kitty' or check your package manager
Example fix
# before kitten choose_fonts # after export KITTY_PATH_TO_KITTY_EXE=/usr/local/bin/kitty kitten choose_fonts
Defensive patterns
Strategy: validation
Validate before calling
if os.Getenv("KITTY_PATH_TO_KITTY_EXE") == "" { exe, err := exec.LookPath("kitty"); if err != nil { /* fail fast with clear message */ } } Prevention
- Set KITTY_PATH_TO_KITTY_EXE in wrapper scripts
- Ensure kitty's bin dir is on PATH in remote/SSH sessions
When it happens
Trigger: Calling choose_fonts in an environment where kitty was launched via a renamed binary, a container with kitty libs but no exe on PATH, or KITTY_PATH_TO_KITTY_EXE points nowhere.
Common situations: Custom builds where the binary is not named 'kitty' or not on PATH; SSH/remote sessions with stripped PATH; Nix/GNU Guix style installs needing explicit env vars.
Understand the failure class
Background: "environment variable is not set" and "Missing keys in environment" errors: what missing required env var messages mean and how to fix them — this error's family across 28 libraries.
Related errors
- Failed to find libxkbcommon
- {path} is not a supported shell
- Trying to send data when to pipe is nil
- Could not encode message to kitty with error: %w
- Failed to send message to kitty with I/O error: %w
AI-assisted analysis of kovidgoyal/kitty@6d5d0c4406 (2026-08-27).
Data as JSON: /api/errors/08d7d8bddf62ab3a.
Report an issue: GitHub.