From this question,

Scroll shell output with mouse in tmux

the setting

setw -g mode-mouse on

allows mouse scroll in tmux. This also causes mouse highlighting by click and drag to be controlled by tmux. Most of the time this behavior is benign and it's sometimes nice to mouse highlighting and keyboard highlighting send yanked text to the same clipboard. The problem I run into is over ssh I now don't have a way of copying text to the system clipboard by highlighting with the mouse.

Is there a way to not have mouse highlighting controlled by tmux or send tmux highlighted text to the system clipboard over ssh?

2 Answers 2


I was experimenting on this a bit recently and noticed that if I ssh into a Linux box from OS X then holding alt/option while I click and drag prevents the tmux-style highlighting. If I'm ssh'ing in from a Linux box then holding shift while I click and drag does the trick.

This is without changing any tmux settings, so mode-mouse is still on.


if I understood correctly, to put the buffer on the system clipboard, I use

$ tmux save-buffer - | c


$ which c
c () {
        xclip -i -selection clipboard

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .