Velvet Star Monitor

Standout celebrity highlights with iconic style.

news

Mouse scrolling in MobaXterm tmux

Writer Andrew Mclaughlin

On my Linux computer I have the following .tmux.conf file:

# Enable mouse mode (tmux 2.1 and above)
set -g mouse on

This allows me to scroll up and down using the mouse wheel while in a tmux session.

If I use Ubuntu on Windows (WSL) to ssh to my Linux computer, this still works fine. I can tmux attach to the session and scroll up and down using my mouse just fine. I can also see the entire history of the tmux session (up to the maximum scrollback limit), but I can't see the ssh command or the tmux attach:enter image description here

enter image description hereNotice I'm able to scroll back all the way to the start of the session, but the ssh and tmux attach commands don't appear.

However, this fails if I use a MobaXterm WSL-Ubuntu session. I start a WSL-Ubuntu session and use the same commands, but now the scroll wheel just fills in the last command, rather than scrolling up:

enter image description here

Additionally, if I scroll up using MobaXterm's scrollbar on the right, I can still see the outside history, and not the session history:

enter image description here

The regular tmux Ctrl+BPgUp scrolls through the session history just fine even in MobaXterm though.

How do I get the behaviour from the Linux/WSL terminal in my MobaXterm WSL-Ubuntu session?

1

1 Answer

You can try to set the Run method of wsl to 'Native connector' and add

set -g terminal-overrides 'xterm*:smcup@:rmcup@'

to ~/.tmux.conf.

See Archlinux: Tmux#Scrolling_issues for more details.

1

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

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