Be more productive using GNU Screen

Despite living in the age of multicore processors, GUI everything and mountains of ram, I continually find myself more productive with a terminal open. Especially when that terminal is running GNU Screen.

About GNU Screen

GNU Screen is a free terminal multiplexer developed by the GNU Project. It allows a user to access multiple separate terminal sessions inside a single terminal window or remote terminal session. It is useful for dealing with multiple programs from the command line, and for separating programs from the shell that started the program.
-courtesy of wikipedia

My .screenrc file

  1. vbell off
  2. escape ~~
  3. autodetach on
  4. altscreen on
  5.  
  6. defflow auto
  7. defscrollback 5000
  8.  
  9. screen -t bash 1
  10.  
  11. #change the hardstatus settings to give an window list at the bottom of the
  12. #screen, with the time and date and with the current window highlighted
  13. hardstatus alwayslastline
  14. hardstatus string '%{= kG}[ %{G}%H %{g}][%= %{= kw}%?%-Lw%?%{r}(%{W}%n*%f%t%?(%u)%?%{r})%{w}%?%+Lw%?%?%= %{g}][%{B} %d/%m %{W}%c %{g}]'

Using GNU Screen

Launching screen creates a new window and launches a command shell in that window. In screen every window is identified by a unique number. When screen made a new window, it numbered it 0. This all happens somewhat invisibly, at least without knowing the right commands to type.

My .screenrc file makes screen more visible and usable. It effectively does 3 things.

  1. Adding a visual taskbar at the bottom of the console
  2. Remap Ctrl-a to the backtick character (to the left of the '1' key).. you'll see why in a bit
  3. Launch a few programs in their own windows (please customize)

Shortcuts

Keys to be typed in succession, not simultaneously
  • ` c : Create Window
  • ` A : Rename Window
  • ` 0 - 9 : Switch to Window with that number
  • ` backspace : Previous Window
  • ` space : Next Window
  • ` " : Bring up a list of all the windows

Pingback

[...] Screen is a versitile tool and a must use for any system admin. I could easily devote a full blog post on screen, in fact I did. Be more productive using gnu screen [...]

Post new comment

The content of this field is kept private and will not be shown publicly.