TIOCGWINSZ reports incorrect window size #23764

Closed
opened 2026-01-31 08:51:53 +00:00 by claunia · 2 comments
Owner

Originally created by @Aonodensetsu on GitHub (Oct 27, 2025).

Windows Terminal version

1.23.12811.0

Windows build number

10.0.26100.0

Other Software

In relation to: https://github.com/tmux/tmux/issues/4659

tmux relies on TIOCGWINSZ to determine the window size, which is used (for example) when determining sixel image cutoff

wt returns the incorrect values, which causes tmux to crop the images incorrectly, a possible solution if fixing the reported values is not viable would be setting x/y pixel values to 0, as the alternate mechanism tmux uses results in correct sizing

Steps to reproduce

  1. Connect to a Linux machine
  2. Use tmux
  3. Display a sixel image in the terminal (example to cat)

Expected Behavior

Sixel image displays correctly

Actual Behavior

Sixel image gets cut off

Originally created by @Aonodensetsu on GitHub (Oct 27, 2025). ### Windows Terminal version 1.23.12811.0 ### Windows build number 10.0.26100.0 ### Other Software In relation to: https://github.com/tmux/tmux/issues/4659 `tmux` relies on TIOCGWINSZ to determine the window size, which is used (for example) when determining sixel image cutoff wt returns the incorrect values, which causes tmux to crop the images incorrectly, a possible solution if fixing the reported values is not viable would be setting x/y pixel values to 0, as the alternate mechanism tmux uses results in correct sizing ### Steps to reproduce 1. Connect to a Linux machine 2. Use `tmux` 3. Display a `sixel` image in the terminal ([example](https://dot.aonodensetsu.me/misc/tattoo.six) to `cat`) ### Expected Behavior Sixel image displays correctly ### Actual Behavior Sixel image gets cut off
claunia added the Needs-TriageIssue-Bug labels 2026-01-31 08:51:53 +00:00
Author
Owner

@j4james commented on GitHub (Oct 27, 2025):

This is a bug in Win32-OpenSSH (assuming you're using the Windows version of ssh). I reported it to them several months ago. See https://github.com/PowerShell/Win32-OpenSSH/issues/2349

If you've got WSL installed, you can work around this by using the Linux version of ssh in WSL. I believe that should work correctly.

@j4james commented on GitHub (Oct 27, 2025): This is a bug in Win32-OpenSSH (assuming you're using the Windows version of ssh). I reported it to them several months ago. See https://github.com/PowerShell/Win32-OpenSSH/issues/2349 If you've got WSL installed, you can work around this by using the Linux version of ssh in WSL. I believe that should work correctly.
Author
Owner

@DHowett commented on GitHub (Oct 27, 2025):

Ah, yeah - thanks James!

@DHowett commented on GitHub (Oct 27, 2025): Ah, yeah - thanks James!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#23764