zellij-org / zellij

A terminal workspace with batteries included
https://zellij.dev
MIT License
21.22k stars 644 forks source link

Zellij reports sixel support even if underlying terminal does not support it #3158

Open l2dy opened 7 months ago

l2dy commented 7 months ago

1. Graphical issue inside a terminal pane (eg. something does not look as it should)

Sixel support is unconditionally reported in a primary DA exchange, which qrc uses to detect sixel support in terminal.

https://github.com/zellij-org/zellij/blob/27bffbf1533b4b2d3c10b1305557c75ddd121374/zellij-server/src/panes/grid.rs#L2886-L2895

Basic information

zellij --version: zellij 0.39.2

stty size: 37 122

uname -av or ver(Windows): Linux <redacted> 5.15.0-203.146.5.1.el9uek.aarch64 #2 SMP Thu Feb 8 17:41:07 PST 2024 aarch64 aarch64 aarch64 GNU/Linux

Further information

Steps to reproduce

  1. Build https://github.com/fumiyas/qrc from source.
  2. Start a terminal emulator without sixel support, e.g. hterm.
  3. Run qrc MAIL outside of zellij in it.
  4. Observe that a QR code is correctly displayed.
  5. Run zellij and qrc MAIL inside it.
  6. Observe no visible output of the qrc command.

Possible solutions

imsnif commented 7 months ago

I hear you, and I'm sorry if this causes inconvenience, but Zellij is itself a terminal emulator that supports Sixel - whether it is connected to another terminal with/without support or not - and so I feel this report is accurate. For example: if a terminal with Sixel support is attached to a session that previously only had terminals without Sixel support attached - the Sixel image will be displayed as expected.

Zellij lives independently of any terminal emulator, and my view is that it should report its own capabilities and do its best to display them according to the capabilities of the attached clients.

Disabling Sixel support as part of the config is something I'd be willing to consider.

l2dy commented 7 months ago

I hear you, and I'm sorry if this causes inconvenience, but Zellij is itself a terminal emulator that supports Sixel - whether it is connected to another terminal with/without support or not - and so I feel this report is accurate. For example: if a terminal with Sixel support is attached to a session that previously only had terminals without Sixel support attached - the Sixel image will be displayed as expected.

I could not get Sixel images displayed even on a terminal with Sixel support, but that's another issue. Maybe #2807

Zellij lives independently of any terminal emulator, and my view is that it should report its own capabilities and do its best to display them according to the capabilities of the attached clients.

Disabling Sixel support as part of the config is something I'd be willing to consider.

Understood. Looking forward to it!

For the time being, I will just apply a patch that reports ?1;2c (VT100) instead.