5

I added the following line to my .screenrc script such that I can use my mouse to scroll up and down in the terminal when the output is too large and long. However, when I try to source .screenrc script. It complains that termcapinfo command not found.

termcapinfo xterm ti@:te@

I have no idea what went wrong ? Why is this happening ?

1 Answers1

8

You should not source it. The file .screenrc is read and interpreted by screen at start up.

Moreover please note that termcapinfo xterm ti@:te@ will work only if your terminal set $TERM variable to xterm. In other case

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

is probably more universal solution.

There is also possibility to scroll by keyboard shortcut Ctrl-a ESC and then use up-down arrows.

jimmij
  • 47,140
  • okay. I added termcapinfo xterm ti@:te@ . But I wasn't able to scroll up to see all the output . Why is this ? – mynameisJEFF Sep 03 '14 at 17:21
  • 1
    Which terminal do you use? Also echo $TERM will be usefull. – jimmij Sep 03 '14 at 17:36
  • I am using Mac Terminal Version 2.4 (326). echo $TERM gives xterm-256color. – mynameisJEFF Sep 03 '14 at 18:00
  • 1
    So use termcapinfo xterm-256color ti@:te@ instead or even better termcapinfo xterm*|rxvt*|kterm*|Eterm*|screen* ti@:te@ – jimmij Sep 03 '14 at 18:09
  • Yes. But how can I scroll up and down in only one screen ? Because I am currently in the 'screen' mode with the terminal printing the output of my python script on the left hand side and the python script(vim ) on right hand side. Is this even possible ? Thanks – mynameisJEFF Sep 03 '14 at 18:43
  • I'm not sure about your set-up, but please note that the "standard" way of of scrolling in screen is to use keyboard shortcut C-a ESC and then use up-down arrows. Try it, maybe this is what you are looking for? – jimmij Sep 03 '14 at 18:48
  • Yes I knew that already. But I have a long list of output thats why i want to do scrolling. Any ideas ? thanks – mynameisJEFF Sep 03 '14 at 18:50
  • @Thomas Ng Please ask separate question describing exactly what is your screen setup and where the problem lies. I think we deviated from the original question too much. I've edited my answer to summarize what we discussed so far. – jimmij Sep 03 '14 at 19:12
  • @jimmij I have the same problem. I have three split screen windows and I need to use mouse scroll wheel to scroll up-down in each one separately. Using up-down arrows is not practical for me as I have long list of outputs while running my program and I need to use my mouse scroll wheel to scroll up-down. I have added termcapinfo xterm|rxvt|kterm|Eterm|screen* ti@:te@ to my .screenrc, but still when I use scroll wheel it does not scroll inside the split screen. – Majid Azimi Feb 26 '18 at 18:39
  • In my case this solution did not work: using the scroll wheel nothing happened. This worked: https://unix.stackexchange.com/questions/40242/scroll-inside-screen-or-pause-output – Antonio Sesto Feb 09 '22 at 06:33