-
Notifications
You must be signed in to change notification settings - Fork 236
Description
Describe the bug
Getting the terminal window size via TIOCGWINSZ ioctl doesn't work inside a toolbox.
Steps how to reproduce the behaviour
- Install the kitty terminal emulator in a user directory, e.g.
~/.local/kitty.app
- Open a kitty window, e.g. by executing
~/.local/kitty.app/bin/kitty
- Inside kitty, run
infocmp -a > xterm-kitty
to save terminal capabilities - Create and enter a toolbox:
toolbox create && toolbox enter
; there should be a warning about unknown terminal typexterm-kitty
- Install the kitty terminal info:
sudo mv xterm-kitty /usr/share/terminfo/x/ && sudo chown root:root /usr/share/terminfo/x/xterm-kitty
- Leave the toolbox
- Run this Python snippet to fetch the terminal window size via ioctl; note the output
- Enter the toolbox while ensuring kitty integration:
toolbox run ~/.local/kitty.app/bin/kitten run-shell
- Run the same Python snippet again and note the output
Expected behaviour
Outside the toolbox:
number of rows: 40 number of columns: 160screen width: 1440 screen height: 760
Inside the toolbox:
number of rows: 40 number of columns: 160screen width: 1440 screen height: 760
Same output both outside and inside the toolbox.
Actual behaviour
Outside the toolbox:
number of rows: 40 number of columns: 160screen width: 1440 screen height: 760
Inside the toolbox:
number of rows: 40 number of columns: 160screen width: 32765 screen height: 0
The window size inside the toolbox is different and obviously invalid.
Output of toolbox --version
(v0.0.90+)
toolbox version 0.0.99.5
Toolbx package info (rpm -q toolbox
)
toolbox-0.0.99.5-11.fc40.x86_64
Output of podman version
Client: Podman Engine
Version: 5.1.2
API Version: 5.1.2
Go Version: go1.22.5
Built: Wed Jul 10 02:00:00 2024
OS/Arch: linux/amd64
Podman package info (rpm -q podman
)
podman-5.1.2-1.fc40.x86_64
Info about your OS
Fedora Silverblue 40
Additional context
Output of toolbox list -i
:
IMAGE ID IMAGE NAME CREATED
649e13d69576 registry.fedoraproject.org/fedora-toolbox:40 7 weeks ago
Output of kitty --version
:
kitty 0.35.2 created by Kovid Goyal
I've logged onto another computer via kitten ssh
and run the Python snippet there and it found the terminal window size without issue. Running pure kitten run-shell
without a toolbox also doesn't block terminal window size from being reported.
Please let me know if I forgot any info, thanks in advance!