screen — .screenrc configuration file 
Linux has many useful tools and utilities. Remote shell manager called screen is certainly one of them. screen allows for remote persistent shell sessions that are immune to connection hangups. The manager has an extensive and powerful set of features. Once mastered, it becomes an essential tool.
Below is a screenshot of a screen session running top task monitor on a research cluster head-node, sunfire01. Notice how the screen status bar (at the bottom) shows that there are three shells currently running within the screen manager. Infact, one shell is local to the host running screen, i.e. sunfire01, and the other two are remote ssh shells on a processing node sunfire16.
It is possible to manually spawn new shells within the screen manager. It is also possible, and quite convenient, to specify default start-up shells in .screenrc configuration file. Here is a sample .screenrc file that accomplishes this.
# C-a :source .screenrc
termcapinfo xterm* ti@:te@
startup_message off
vbell off
autodetach on
altscreen on
shelltitle "$ |bash"
defscrollback 10000
defutf8 on
nonblock on
hardstatus alwayslastline
hardstatus string '%{= kw}[ %{= kb}%H%{= kw} ][%= %{= kw}%?%-Lw%?%{= kW}%n*%f %t%?%?%{= kw}%?%
+Lw%?%?%= ][ %{r}%l%{w} ]%{w}[%{r} %d/%m/%y %C %A %{w}]%{w}'
bind 'q' quit
# syntax: screen -t label order command
screen -t sunfire01 0
screen -t sunfire16 2 ssh s1554463@sunfire16
screen -t sunfire16 1 ssh s1554463@sunfire16
Please note that WordPress replaces some default ASCII characters, such as f.e. quotes, to dress-up the posts. This can cause errors when copying commands from WordPress posts back into bash. For that reason a text file version of the .screenrc file is also provided.
Did you find the above information useful and interesting? If so, please support this site by using the blog directory links at the bottom of this page. Thanks for your support!
If you have any Linux related problems or questions then please feel free to post them on our Linux Forums: http://linux.dsplabs.com.au/forums.


July 20th, 2009 at 5:45 pm
[…] you can configure it yourself (as in the Red Hat guide above) or look at these cool options: http://linux.dsplabs.com.au/gnu-screen-screenrc-configuration-file-p13/. Here is my […]
August 21st, 2011 at 8:38 am
Thanks~I got it.
November 6th, 2011 at 3:25 pm
How do I configure my screenrc file to open a terminal in a specific place?