zellij: Sixel images distorted; sixel images have too much bottom padding; sixel causes buffer full error
💌 Thank you note (that has nothing to do with the bug)
Thank you for working on zellij! 💙 I have been using it daily for only a week and it’s already totally replacing tmux for me (and I’d been using screen/tmux since 2012!). I do a lot of screen sharing from my mac to a linux machine using a projector while I’m coding, so that my partner and I can hack on cool projects together in vim/neovim. They can then also jump into the same session when we’re done rubberducking.
This tool has totally changed how we work together and I promise when I have time, I will post some pictures of just how cool and hacker aesthetic this looks when we have two tiny screens and one major screen running zellij sessions to manage everything from spotify to email to small python projects to active development of larger scale kubernetes projects 😃 Being able to have beautiful tabbing, floating windows, and fast splits, really means a lot to our productivity, so thank you so much. I will try to sponsor when I am not also a poor dev.
I’m having some issues with sixel support, mostly happening when scrolling after displaying an image somewhere. The image prints okay, but with a lot of padding on the bottom of empty space, and then you scroll, it breaks up, sometimes over writing the rest of the screen buffer and making it unreadable. If it gets too bad, zellij will crash. This happens on iterm2 (macOS) and wezterm (Ubuntu). The problem is particularly pronounced when using w3m, but also happens just using img2sixel directly on the command line. (in the screenshots/video below, sixel
is an alias to img2sixel
)


In Case of Graphical or Performance Issues
- _Delete the contents of
/tmp/zellij-1000/zellij-log
, ie withcd /tmp/zellij-1000/
andrm -fr zellij-log/
- Run
zellij --debug
- Run
stty size
, copy the result and attach it in the bug report - Recreate your issue.
- Quit Zellij immediately with ctrl-q (your bug should ideally still be visible on screen)
I tried to do the above on my mac, but no there is no directory called /tmp/zellij-*
on my mac, so I just recorded a little video for you here:
https://user-images.githubusercontent.com/2389292/209536832-19ad0aa1-a677-4438-b5d0-3a1e30af6361.mp4
On Ubuntu running wezterm, the same issue with sixel seems to happen, but this time with logs (when I ran an experiment with a different picture of a dog on wezterm on Ubuntu, it crashes): zellij-9.log zellij.log
Also noteworthy is that after zellij crashes with Error occurred in server: Buffer full
, it can’t be launched again until you delete the hung process (this happens on both Ubuntu and macOS):
# ps aux | grep zell
friend 207864 0.1 0.2 13898484 45800 ? Sl 10:23 0:00 /home/linuxbrew/.linuxbrew/Cellar/zellij/0.34.4/bin/zellij --server /run/user/1000/zellij/0.34.4/available-muscle --debug
Basic information
(this happens on macOS -iterm2, and Debian/Ubuntu -wezterm)
zellij --version
: zellij 0.34.4 (same version on all machines)
stty size
: 43 143 (this is from my 13 inch macbook that I use to access sessions locally but also sessions on Debian/Ubuntu)
uname -av
or ver
(Windows):
- Ubuntu: Linux compu.lan 5.15.0-56-generic # 62-Ubuntu SMP Tue Nov 22 19:54:14 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
- macOS: Darwin j-macbookpro.lan 22.2.0 Darwin Kernel Version 22.2.0: Fri Nov 11 02:08:47 PST 2022; root:xnu-8792.61.2~4/RELEASE_X86_64 x86_64
List of programs I interact with
iterm2
on macOS: Build 3.4.18wezterm
on Ubuntu via flatpak: 20221119-145034w3m -version
(same on linux and macOS): w3m version w3m/0.5.3+git20221221, options lang=en,m17n,image,color,ansi-color,mouse,menu,cookie,ssl,ssl-verify,external-uri-loader,w3mmailer,nntp,gopher,ipv6,alarm,mark (compiled with sixel support)
Please let me know if there’s any other info that would be helpful. Thank you!
About this issue
- Original URL
- State: open
- Created 2 years ago
- Reactions: 5
- Comments: 15 (4 by maintainers)
Hi, is there any progress on this? I just checked again with the current version and on my end the behavior is still the same
I have performed the steps requested to rebuild with the addition logging enabled and attached a video of myself re-creating the issue on a Debian12 amd64 host.
Also attached are the logs generated by both the standard and rebuilt executables.
Video: https://user-images.githubusercontent.com/84841307/226175132-c579adc4-1eb6-4063-a0bb-d8d2fe4e66d8.mov
Logs:
zellij-additional-logging.log
zellij-default.log
EDIT: I was wrong, see jessebot’s comment below
OLD TEXT: Looks like this issue was only reproducible when using iterm2. We switched to using wezterm on MacOS/Linux and are no-longer seeing this bug 🤷
Alright! Looks like we have no choice but to do this the hard way. 😃
I’m going to ask you to have Zellij log all the render messages it sends to your terminal so that I can go through them manually and figure out what’s going on here.
To do this, please add this line:
above this line here: https://github.com/zellij-org/zellij/blob/main/zellij-client/src/lib.rs#L405
Then recreate the issue (with as few interactions with your terminal as possible so as not to inflate the log too much) and attach the contents of zellij.log (no need to attach the other files or to run Zellij with --debug) here.
Thanks!
That’s very heartening to hear! Sounds like you did a cool job despite being put on the spot like that. Thanks for helping spread the word, and I hope you get the job (if you want it 😃)!
I might bug you in the future when I have to demonstrate the tool to DevOps people, since the last time I did any serious work in that space, Chef was all the rage 😃
Hey @jessebot - now it’s my turn to apologize for the delay!
So, I have a guess - if you’re willing to try and build Zellij from main and change some minor stuff?
Basically, I want to change these values: https://github.com/zellij-org/zellij/blob/main/zellij-server/src/os_input_output.rs#L53-L54 which are a different way for programs to query the pixel size of the (corresponding pty of the) window they’re opened in.
I’d like to try and change them to the same values you’d get from this query
echo -e "\033[14t"
. So the process should be:echo -e "\033[14t"
[4;
is the y size, the one after it the x.Hoi 👋
Thanks for all your work on Zellij! It’s been a real game-changer coming from using tmux/hyper to handle my multiplexing needs.
Looks like I’m also having this issue in Zellij on iterm2, I’ve taken some screenshots of the suggested actions:
In a Zellij Session:
Out of the session:
If there’s any other testing that can be done to assist in debugging, please feel free to let me know 🙌
Hey @jessebot - really glad you’re happy with Zellij. What you mentioned sounds like a cool use-case, I hope to have more time to put in more cool multiplayer features in the future.
I was unfortunately not able to reproduce this. Using wezterm (I don’t have access to a mac, so couldn’t try with iterm2) with either bare
img2sixel
or even bycat
ing the log file you attached, which means I’m getting the exact same bytes over the wire, ruling out application versions and the like.I still want to solve this, so let’s explore this further:
echo -e "\033[16t"
, what do you get? If you quit zellij and do it again (making sure not to change font size or window size) do you get the same thing?