iterm2-website
iterm2-website copied to clipboard
imgcat does not work in tmux
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?
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.
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?
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.
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.