gnachman / iterm2-website

Website for iTerm2
http://iterm2.com/
GNU General Public License v2.0
80 stars 66 forks source link

imgcat does not work in tmux #55

Open spinningarrow opened 5 years ago

spinningarrow commented 5 years ago

When I use imgcat in a local tmux session, I see the base64 text of the image. In a regular (non-tmux) tab, imgcat works fine. Is it supposed to work in tmux as well?

gnachman commented 5 years ago

imgcat works in tmux integration mode (kind of—it won't show your images after you reattach). It sounds like your $TERM might not be set to screen or screen-256color, which causes it to not detect that it's in tmux and print a code tmux doesn't handle properly.

spinningarrow commented 5 years ago

When I do echo $TERM inside tmux, it prints screen. Is that correct?

I should mention that I'm running tmux normally inside a regular iTerm pane - not making use of iTerm's tmux integration feature. Is that supported?

gnachman commented 5 years ago

I just tested in non-integration tmux and reproduced your issue. It is pretty much hopeless to get imgcat working in regular tmux, unfortunately. It works in tmux integration mode except images are lost when you reattach.

mellery451 commented 1 year ago

I have a double-whammy use case of mosh and tmux (to remote servers)...and unfortunately they BOTH break imgcat (I've tried each independently). too bad...I really like this feature, but I guess I can only use it plain-vanilla SSH connections.