kovidgoyal/kitty · error
Terminal does not support reporting screen sizes in pixels,
Error message
Terminal does not support reporting screen sizes in pixels, use a terminal such as kitty, WezTerm, Konsole, etc. that does.
What it means
icat needs the terminal window size in pixels to place/scale images. The resolved screen size reports 0 pixels in width or height, meaning the terminal (or its queries) did not supply pixel dimensions.
Source
Thrown at kittens/icat/main.go:249
return 1, err
}
}
switch {
case opts.ClearAll:
cc := &graphics.GraphicsCommand{}
cc.SetAction(graphics.GRT_action_delete).SetDelete(graphics.GRT_free_by_range).SetLeftEdge(0).SetTopEdge(math.MaxUint32)
if err = cc.WriteWithPayloadTo(os.Stdout, nil); err != nil {
return 1, err
}
case opts.Clear:
cc := &graphics.GraphicsCommand{}
cc.SetAction(graphics.GRT_action_delete).SetDelete(graphics.GRT_free_visible)
if err = cc.WriteWithPayloadTo(os.Stdout, nil); err != nil {
return 1, err
}
}
if screen_size.Xpixel == 0 || screen_size.Ypixel == 0 {
return 1, fmt.Errorf("Terminal does not support reporting screen sizes in pixels, use a terminal such as kitty, WezTerm, Konsole, etc. that does.")
}
items, err := process_dirs(args...)
if err != nil {
return 1, err
}
if opts.Place != "" && len(items) > 1 {
return 1, fmt.Errorf("The --place option can only be used with a single image, not %d", len(items))
}
files_channel = make(chan input_arg, len(items))
for i, ia := range items {
ia.index = i
files_channel <- ia
}
num_of_items = len(items)
output_channel = make(chan *image_data, 1)
keep_going = &atomic.Bool{}
keep_going.Store(true)View on GitHub (pinned to 6d5d0c4406)
Solutions
- Run directly in kitty, WezTerm, or Konsole
- If under tmux, set tmux to pass through the window size (terminal-overrides / latest tmux) or detach
- Verify with kitty +kitten icat --print-window-size that a non-zero pixel size is reported
Defensive patterns
Strategy: fallback
Validate before calling
out, err := exec.Command("kitty","+kitten","icat","--print-window-size").Output()
// parse WxH; if either is 0, fall back to sixel/ascii or abort Prevention
- Check pixel size with --print-window-size before scripting icat
- Avoid running icat through tmux/screen without passthrough config
When it happens
Trigger: Running kitten icat inside tmux/screen or a plain VT that answers TIOCGWINSZ with ws_xpixel/ws_ypixel = 0, or --use-window-size with pixel fields ending as 0 after some code path.
Common situations: tmux without proper TIOCGWINSZ passthrough; SSH into a legacy terminal; running under a non-graphics-protocol terminal multiplexer.
Related errors
- This terminal does not support the graphics protocol use a t
- Timed out waiting for a response from the terminal: %w
- Invalid value for --background: %w
- Invalid value for --z-index with error: %w
- unknown fit specification: %#v
AI-assisted analysis of kovidgoyal/kitty@6d5d0c4406 (2026-08-27).
Data as JSON: /api/errors/b16265724a28f86a.
Report an issue: GitHub.