I love screen, but it drives me nuts that I have to stop typing input, hit CTRL+A [, and then find what I need.

Is there a way to make the scroll wheel function normally, rather than scrolling commands?

Also, is it possible to enable Shift+PageUp/PageDn?


I use these settings with urxvt in my ~/.screenrc:

termcapinfo rxvt-unicode ti@:te@
termcapinfo rxvt ti@:te@
termcapinfo rxvt 'hs:ts=\E]2;:fs=07:ds=\E]2;screen07'

Those allow for scrollbar and mouse wheel to do "the right thing™".

Note that this is dependent on terminal type, so will not work if your terminal is not of type rxvt. If it doesn't work, try replacing rxvt and rxvt-unicode with the appropriate terminal type (get this by running printf $TERM.)

  • 2
    +1. Using "xterm" instead of "rxvt" and "rxvt-unicode", Shift-PgUp/-PgDown work for me on gnome-terminal. But the mousewheel scrolls in the shell history. – daniel kullmann Jul 17 '12 at 7:24
  • when using gnome-terminal, mousewheel scrolls normal, i.e. in scrollback. – daniel kullmann Jul 17 '12 at 7:31
  • When I use screen in gnome-terminal. Don't worry about it... – daniel kullmann Jul 17 '12 at 7:38
  • 1
    This also worked for me using xterm in place of rvxt*. Thanks! – Bryan Agee Jul 19 '12 at 18:24
  • Could you explain what each of these command do, please? – Totor May 3 '14 at 12:39

check your $TERM variable to see what terminal you are actually using. If its xterm (or xterm*) use add this to ~/.screenrc to allow mouse scrolling:

termcapinfo xterm* ti@:te@

or to be more complete:

termcapinfo xterm*|rxvt*|kterm*|Eterm* ti@:te@

absent modifying your ~/.screenrc, you can scroll with Ctrl-a ESC and then use up-down arrows. q to quit.

Note: you can also use your mouse to change focus between split windows via adding this to your ~/.screenrc

mousetrack on

Term Cap is a device independent terminal description library/database.

References/copies from:

Terminal: termcapinfo command not found



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.