<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Will Sheppard</title>
    <description>The latest articles on DEV Community by Will Sheppard (@willsheppard).</description>
    <link>https://dev.to/willsheppard</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F281683%2Fa3613868-4b04-4376-b37a-d4a66b9b169c.jpeg</url>
      <title>DEV Community: Will Sheppard</title>
      <link>https://dev.to/willsheppard</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/willsheppard"/>
    <language>en</language>
    <item>
      <title>One line in ~/.screenrc makes scrolling in GNU screen work!</title>
      <dc:creator>Will Sheppard</dc:creator>
      <pubDate>Tue, 10 Nov 2026 10:01:23 +0000</pubDate>
      <link>https://dev.to/willsheppard/one-line-in-screenrc-makes-scrolling-in-gnu-screen-work-1lgc</link>
      <guid>https://dev.to/willsheppard/one-line-in-screenrc-makes-scrolling-in-gnu-screen-work-1lgc</guid>
      <description>&lt;p&gt;I use multiple terminal sessions and my device can't be constantly online so naturally I need GNU screen.&lt;/p&gt;

&lt;p&gt;But typing &lt;code&gt;Ctrl-a &amp;lt;escape&amp;gt;&lt;/code&gt; a million times a day was killing me! Then I finally discovered the setting to make scrolling "just work".&lt;/p&gt;

&lt;h2&gt;
  
  
  Make scrolling work in GNU screen
&lt;/h2&gt;

&lt;p&gt;Add this line to &lt;code&gt;~/.screenrc&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;termcapinfo xterm* ti@:te@
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Screen then stops using the alternate screen, so scrolling uses your terminal's own scrollback. The &lt;code&gt;xterm*&lt;/code&gt; pattern must match your terminal. Check with &lt;code&gt;echo $TERM&lt;/code&gt; inside screen.&lt;/p&gt;

&lt;p&gt;This probably also makes scrolling work in byobu and tmux as well, but I haven't tested those.&lt;/p&gt;

&lt;h2&gt;
  
  
  The other way to scroll in screen
&lt;/h2&gt;

&lt;p&gt;For per-window scrollback: Press &lt;code&gt;Ctrl-a [&lt;/code&gt;, then scroll with the arrow keys or Page Up and Page Down. Press &lt;code&gt;Esc&lt;/code&gt; to leave.&lt;/p&gt;

&lt;p&gt;To set its size, add this to &lt;code&gt;~/.screenrc&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight viml"&gt;&lt;code&gt;&lt;span class="n"&gt;defscrollback&lt;/span&gt; &lt;span class="mi"&gt;10000&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>linux</category>
      <category>productivity</category>
    </item>
  </channel>
</rss>
