Open jessebot opened 1 year ago
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 by cat
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?Thank you for your quick followup! I got really busy with a project, so sorry for the delay in my response.
Update: This seems to be entirely related to iterm2, because when I try to reproduce it on the actual machine running Debian/Ubuntu with wezterm, not via SSH, but still in a zellij session, I can't reproduce it. Previously, when I was testing, I was SSHed into the Ubuntu machine from my mac in iterm2, but viewing the session on a monitor for Ubuntu, that was using wezterm as the terminal.
So this narrows it down to it being an iterm2 issue. What's weird is that I don't have this issue with most programs in iterm2, except two: zellij
and neofetch
(neofetch may be unsavable, but if you're curious, there it's because the window size is calculated with a program that isn't actually in the PATH
by default)
From within Zellij, if you do 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?
I tried this and it returns the same thing both times here when trying from within a zellij
session:
# disabled powerline prompt for this b/c I wanted to test that it wasn't a weird powerline thing and it was not
jesse-macbookpro:~ jhitch$ echo -e "\033[16t"
^[[6;20;10tjesse-macbookpro:~ jhitch$ echo -e "\033[16t"
NOTE: the above is from iterm2 full screened on my mac locally and stty size
still returns 43 143.
Is there anything else I can try to do here? I don't know rust, but I'm willing to try to learn if you can point me where to start taking a peak in zellij :)
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 - 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.Okay, I can try that today :) Also, don't apologize, I'm just happy we both try to eventually respond hahaha
Side note: I was in a senior devops engineer job interview yesterday (this was for a company that does ML work for satellite imagery). They asked me to do an (unplanned for) 5 minute demo of something I recently found cool (this was over Google meets), so I demoed zellij and they said "Wow, it's like discovering neovim after using vim forever!" and "This is cool! People in the office would definitely like to know about this." and it was a nice moment of high praise for zellij, and also honestly a really cool thing to demo. It was so nice to just say, "Sure, let me share my screen!" and then open a terminal, launch zellij, and start talking about the cool things it enables me to do when doing intensive kubernetes testing locally. I shined a spotlight on the easily adjustable sizing of panels (very useful for reading logs), intuitive tabs and renaming capabilities (very useful for labeling things for code demos!), floating panels (especially for putting things into the background temporarily, like an instance of the python interpreter to verify a python function, or tailing a k8s pod log), and the ability for others to join your session. It wasn't the best demo in the world, because I wasn't prepared, but it was still awesome to geek out with others about terminal multiplexers, and get some great feedback that I can also share with you and the other volunteers that make this project special :)
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 :)
Build Zellij from main and run it (there are some detailed instructions in here but I'm happy to also answer questions if you have any).
My mac is old and building zellij for the first time (I just installed rust) really made it sound like it was taking off for flight and took about 8 minutes but I did it. The load average on this macbook was at like 20 and it took 75%-80% CPU usage to get this done, but only initially!
After that, I was able to use cargo xtask run
and run the echo command:
Then I modified file you mentioned:
git diff .
diff --git a/zellij-server/src/os_input_output.rs b/zellij-server/src/os_input_output.rs
index 07bd7c0f..ccb87f88 100644
--- a/zellij-server/src/os_input_output.rs
+++ b/zellij-server/src/os_input_output.rs
@@ -50,8 +50,8 @@ fn set_terminal_size_using_fd(fd: RawFd, columns: u16, rows: u16) {
let winsize = Winsize {
ws_col: columns,
ws_row: rows,
- ws_xpixel: 0,
- ws_ypixel: 0,
+ ws_xpixel: 1400,
+ ws_ypixel: 760,
};
// TIOCGWINSZ is an u32, but the second argument to ioctl is u64 on
// some platforms. When checked on Linux, clippy will complain about
Then I did a cargo xtask build
again, this time in under 30 seconds, only takinga bit more time on zellij-server as we changed a value :).
Finally, I tested it again with cargo xtask run
and unfortunately, it seems like it's still adding more padding to the bottom:
Happy to tweak anything else!
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:
log::info!("output: {:?}", output.as_bytes());
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!
I'll get this done today! Thank you :)
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 🤷
Yeah, sorry to take literally months to come back to this. I started a new job and was just really busy, but as @cloudymax mentioned, we've switched entirely to wezterm, where this isn't really an issue on either macOS or Debian Bookworm :)
EDIT: I spoke too soon. It still happens on shared sessions in zellij. Not sure if this is again because the session I'm connecting to is on Debian bookworm via SSH from macOS. Let me get you that log!
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.
Logs:
I experience very similar issues.
My terminal emulator is contour and while I don't get unnecessary padding, the image gets scaled weirdly and overhangs into the next lines:
when clear
ing it persists:
I installed wezterm in order to see how things are over there and with this i get properly scaled images with large padding, just like jessebot.
Also on Wezterm sixel images that should be transparent for some reason aren't
On Konsole sixel images are weirdly broken and still persist after clear
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
💌 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 toimg2sixel
)In Case of Graphical or Performance Issues
/tmp/zellij-1000/zellij-log
, ie withcd /tmp/zellij-1000/
andrm -fr zellij-log/
zellij --debug
stty size
, copy the result and attach it in the bug reportI 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):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
orver
(Windows):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!