iterm2-website icon indicating copy to clipboard operation
iterm2-website copied to clipboard

imgcat does not work in tmux

Open spinningarrow opened this issue 6 years ago • 4 comments

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?

spinningarrow avatar Aug 01 '18 09:08 spinningarrow

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.

gnachman avatar Aug 04 '18 01:08 gnachman

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?

spinningarrow avatar Aug 07 '18 02:08 spinningarrow

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.

gnachman avatar Aug 09 '18 19:08 gnachman

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.

mellery451 avatar Apr 05 '23 20:04 mellery451