Skip to content

Sixel and tmux passthrough over ssh not rendering jpegs, ignoring sizes, and other chaos #217

@stevenwalton

Description

@stevenwalton

I've been trying to get chafa to work well with fzf (on wezterm) so I can remotely preview images on my servers. When sshing in I seem to be getting an issue where I require using the -f sixels command.

Here's an example when I'm just sshing and there is no fzf nor tmux involved (the command is similar to what I have in my fzf configuration).

(ssh)

Screenshot 2024-09-09 at 3 58 02 PM

There's two things that seem off to me

  1. The size is not respected. This is even true if I use --size (full command being chafa -s 120x80 20240320_073017.jpg)
  2. The image quality is quite poor. This issue does not exist when I'm sitting at a monitor in front of my server, only over ssh

This can be resolved through -f sixels but this is where things get weird. Outside of tmux, things work as expected (yay, problem solved?) but once in tmux jpeg images just don't render. Let me demonstrate

(I'll put most images in dropdowns with default close for easier reading of the issue)

Example with sixels enabled where we see high quality image (`ssh` + `-f sixels`)

Screenshot 2024-09-09 at 4 11 07 PM

Example within `tmux` over `ssh` (`tmux` + `ssh`)

Screenshot 2024-09-09 at 4 02 35 PM

So image quality dramatically decreases.
Adding Passthrough (`tmux` + `ssh `+ `--passthrough auto`)

Screenshot 2024-09-09 at 4 09 28 PM

(specifying `tmux` makes no difference)

Now let's add our -f sixels flag (tmux + ssh + -f sixels)

Screenshot 2024-09-09 at 4 04 15 PM

And we get ***nothing***!!!
`tmux` + `ssh` + `-f sixels` + `--passthrough auto`

Screenshot 2024-09-09 at 4 17 30 PM

Okay, but what about a png? (`ssh` + `tmux` + `-f sixels`)

Screenshot 2024-09-09 at 4 07 47 PM

I didn't even need the passthrough! (do I ever?)

If I try to scroll then the image disappears so I can't include the command in the screenshot :(

So I'm not quite sure what is actually going on here and what the issue is. But it appears to me that when using tmux and ssh jpegs do not render but pngs do.

When not sshing I only have issues when using tmux and/or fzf

Maybe I've missed something in the docs but I tried looking and didn't see any issue related to this.

Relevant info:
Host machine:

$ inxi -S
System:
  Host: foo Kernel: 6.10.8-arch1-1 arch: x86_64 bits: 64
  Console: pty pts/19 Distro: EndeavourOS
$ chafa --version
Chafa version 1.14.2

Client machine:
MacBook Air M2
Sonoma 14.6.1

related fzf config lines (but this is tangential to the issue since this is all without fzf, but is the end goal)

Let me know if there is more information needed or if I've missed something.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions