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. ©2007

Screen session

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. ©2007

# 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
# ©2007
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:

VPS Hosting Referral Code DZZCC3

Add me to Technorati Favorites Vote for me on Blog Catalog

4 Responses to “screen.screenrc configuration file”

  1. Arnab’s Universe » GNU Screen Says:

    […] you can configure it yourself (as in the Red Hat guide above) or look at these cool options: Here is my […]

  2. Roowe Says:

    Thanks~I got it.

  3. meh Says:

    How do I configure my screenrc file to open a terminal in a specific place?

  4. Why Is Screen Not Showing The Current Running Process Name? (Mac OSX Terminal Bash) | Click & Find Answer ! Says:

    […] is the screenrc (got it from here):$ cat ~/.screenrc termcapinfo xterm* ti@:te@startup_message offdefutf8 onshelltitle "$ |what?" # […]

Leave a Reply