Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sixel ghosting under tmux #379

Open
xstasi opened this issue Oct 10, 2024 · 7 comments
Open

Sixel ghosting under tmux #379

xstasi opened this issue Oct 10, 2024 · 7 comments

Comments

@xstasi
Copy link

xstasi commented Oct 10, 2024

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!

@thisismygitrepo
Copy link

Same with zellij. I believe its the session multiplexer to blame.

@xstasi
Copy link
Author

xstasi commented Oct 11, 2024

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.

@mfontanini
Copy link
Owner

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.

@mfontanini
Copy link
Owner

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.

out

@xstasi
Copy link
Author

xstasi commented Oct 12, 2024

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 :)

@mfontanini
Copy link
Owner

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.

@j4james
Copy link

j4james commented Oct 13, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants