presenterm
presenterm copied to clipboard
Sixel ghosting under tmux
Hi there, I'm encountering some strange image ghosting issues when running inside of tmux.
Steps to reproduce:
- Open Konsole (other sixel-capable terminals untested)
- Run tmux (sixel capable versions, I think 3.4+ - also tried with git)
- Run demo presentation with --image-protocol sixel
- View slides with doge, maybe go back and forth a couple of times
- Quit
- Two doges now inhabit your terminal, you need to do ^L a couple of times to shoo them away
Alternative steps:
- Run demo presentation with --image-protocol sixel --theme terminal-dark
- View slides with doge, going back and forth
- Slides now have two doges
I have also experienced this with a simple presentation I'm making, where a picture will still be partly there when transitioning from one slide to another.
For some reason this does not happen if tmux is not used.
It may be a tmux bug but I haven't been able to reproduce it with other sixel-capable programs so I have to start somewhere :) maybe presenterm isn't doing some due diligence after a slide is viewed to clear up the terminal?
Thanks!
Same with zellij. I believe its the session multiplexer to blame.
Same with
zellij. I believe its the session multiplexer to blame.
Maybe not - it doesn't happen on foot for me but it happens on konsole.
There must be some terminal black magic at work here, I have nowhere near the competencies to debug.
I have the feeling I saw this at some point while adding multiplexer support but I can't remember exactly what happened. I'll have a look soon.
This seems to be a general problem with konsole unfortunately, see the attached gif. Basically running img2sixel, and then man causes man to have the image as a background. I know you probably don't want to change your terminal just for presentations but kitty/wezterm support for images is much better. I personally use alacritty but use kitty when I need to present something.
Can you point me to some tool that works fine? I'd like to see what they're doing and mimic that. Sixel in general is very obscure and not very well documented so it's hard to guess how to avoid this.
Thanks! I am not aware of any sixel capable tool that works, in fact I never heard about sixel before I used presenterm.
The thing is, this is super annoying to pinpoint as it only happens when using the combination of sixel, tmux and konsole.
Using konsole without tmux I can present fine AFAICS - there are other problems but the ghosting is mostly ok. If you try img2sixel outside of tmux it will be fine. At the same time, presenting inside of tmux using foot instead of konsole also works.
I'm not married to sixel, I would just like to avoid using kitty because of the author's history of - ehr - unorthodox choices, such as leaving local root vulnerabilities in his other software. I'll give wezterm a try :)
I would just like to avoid using kitty because of the author's history of - ehr - unorthodox choices
Yeah, I completely agree but unfortunately the kitty graphics protocol is the most efficient and snappier one. Wezterm implements the kitty protocol too but last I checked it had a few issues.
I think the issue you're seeing in Konsole is a known bug. Writing text over a sixel image is supposed to erase the image in those cells, but Konsole doesn't handle that correctly.
This was discussed in the Jexer repo a few years back, and I got the impression that it was a deliberate choice by Konsole. However, they've more recently posted a patch which sounds like it might be intended to fix the problem. Although I might be misinterpreting that - I haven't actually tested it.
Closing this since it seems like it only happens in specific combinations of terminals + tmux. I confirm this works fine in wezterm under tmux when using --image-protocol sixel so it doesn't seem to be presenterm's fault. Please comment if more people are hitting this.