How to prevent gnu screen capturing the mouse?

I want to use local scrollback on my terminal, whilst using gnu screen. That's because my network connection is incredibly slow, so using screen's scrollback is very slow. Local scrollback is much better.

This works, using "termcapinfo xterm* ti@:te@" in my .screenrc.

However, the mouse is mapped to screen's 'up'/'down' cursor keys, rather than being mapped to my local terminal scroll. Why? When screen is not running in the remote ssh session, using the mouse to scroll works just fine. But it seems like somehow gnu screen is telling my local terminal to just send it the mouse wheel commands, and ignore them itself?


Solution 1:

Press Ctrl+A on the keyboard and press Esc.

Press the Up and Down arrow keys or the PgUp and PgDn keys to scroll through previous output.

Press Esc to exit scrollback mode.

In screen it is done this way because each virtual terminal has its own scrollback buffer.

So I don't think you'll be able to do it the way you want to do it using screen. I have heard that it is possible to use the mouse to scroll using byobu instead of screen. Frankly either byobu or tmux are better IMHO. I prefer tmux, never tried to scroll in it though.