7

Instead of ssh-ing from many terminal windows to a remote server, I deceded to start using tmux via one single ssh connection. There are things I cant seem to get working though.

The most important is, how do I make the terminal mouse-scrollable? bash setw -g mode-mouse on seems to do nothing. Can I somehow configure my terminal to send the actions of scrolling via ssh too?

If it is impossible, is there a workaround to bind page-up and page-down to scroll up and down?

I am using tmux-2.5rc via ssh -YX and other applications allow mouse scrolling.

  • Sometimes I can scroll off the tmux window and see the tmux attach command. Is that normal? :D – Adam Hunyadi May 23 '17 at 5:36
12

Assuming your terminal program is not hijacking the mouse wheel inputs, you should be able to add this to your $HOME/.tmux.conf (for tmux >= 2.1)

set-option -g mouse on

Depending upon your terminal program, this option may help as well, allowing tmux to tell your terminal that it wants more control over the contents of the terminal window.

setw -g alternate-screen on

Regarding your comment:

Sometimes I can scroll off the tmux window and see the tmux attach command. Is that normal?

If you haven't set that option in your tmux config, then yes, that is expected. You are likely scrolling back in the buffer history of your terminal program rather than tmux's buffer.

Finally, more information can be found in other questions that are essentially the same: here, generically and here (for MacOS and iTerm)

| improve this answer | |
  • Ah, it worked. I tried doing setw instead of set-option before. – Adam Hunyadi May 23 '17 at 9:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.