/ console

Useful .screenrc settings for GNU Screen

When installing linux on any computer (server or workstation) the first program I always install is GNU Screen! The one thing I always had a problem with when using screen was that I did not know which exact window I had open within a screen session. What I was looking for was a way to have some sort of a task-manager in screen.

Luckily, I found some settings for the .screenrc file to achieve just this! If you add the following lines to your ~/.screenrc file:

kill startup message startup_message off #It displays a status line at the bottom of the terminal which shows what window you're in and a list of the other windows. termcapinfo xterm "ks=E[?1lE:kuE[A:kd=E[B:kl=E[D:kr=E[C:kh=E[5~:kH=E [F" hardstatus alwayslastline "%{-b gk}%-w%{+b kg}%50>%n %t%{-b gk}%+w%The first line is easy because I am not interested in seeing the startup messages of screen every time I open it :) The last part will create the actual task manager in the bottom line of your terminal, as shown below:

[![Task manager in screen](/content/images/2012/09/screen-task-manager-300x178.png "Task manager in screen")](/content/images/2012/09/screen-task-manager.png)Task manager in screen
The name of the screen in the bottom line can be changed by just renaming the window with the gnu-screen command Ctrl-a Shift-A.

This task manager line helps me to easily work with multiple windows each logged in with a different user, viewing a different file, or in a different directory.

Guido Diepen

Guido Diepen

Senior Data Scientist at T-Mobile NL | Fascinated with new technologies and tools | Trying to automate the boring bits of life | Love to travel

Read More