Ssh – Can mouse wheel scrolling work in a Screen session

gnu-screenmouseputtyscrollingssh

Is there any way to use the mouse wheel to scroll through the output of a screen session?

I can use the keypad scroll through previous output in screen after pressing ctrl+a [. Is it possible to do this with the mouse wheel?

(I'm using putty, but I don't think it's a putty issue, I believe it's a screen issue.)

Best Answer

Mouse scrolling and elevators will work if you enable them in your .screenrc.

Screen FAQ

Q: My xterm scrollbar does not work with screen.

A: The problem is that xterm will not allow scrolling if the alternate text buffer is selected. The standard definitions of the termcap initialize capabilities ti and te switch to and from the alternate text buffer. (The scrollbar also does not work when you start e.g. 'vi'). You can tell screen not to use these initialisations by adding the line termcapinfo xterm ti@:te@ to your ~/.screenrc file.

So in my .screenrc, I have:

termcapinfo xterm* ti@:te@

In tmux, it'd be something like (.tmux.conf):

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