Gnu Screen

I'm a big fan Gnu Screen since I work a lot with the console. It multiplexes several shell sessions into one physical console window and it's especially suited for remote server adminstration as it keeps your sessions runing even if you disconnected. It's basically a tabbed shell instance browser.

I use it for setting up several local screens and also a screen to a remote server which is running irssi connected to an internal irc server. By having a remote screen session running I don't have to restart irssi everytime I logon to that server, instead I just reattach to the running screen session and voila irssi is there running.

To install screen, I first install mac ports which downloads, compiles and installs command line, X11 and Aqua based open source software. Install screen by issuing 'sudo port install screen'.

I've mapped the default escape command 'C-a' to 'C-space' instead which much more convenient. So I have C-space mapped for screen, Alt-space for Quicksilver and then Command-Space for  Spotlight.

My ~/.screenrc

# no start up message
startup_message off
vbell on
vbell_msg ""
defscrollback 10000
# enable alternate screens, for example if you quit out of man pages 
# the display will be redrawn as it was before
altscreen on
# detach on hangup
autodetach off
#msgwait 2 # 1 second messages
# no flow control, e.g. ^S and ^Q
defflow off
# bindings
#escape ``
# use the \ key instead of 'C-a' for commands
#escape \\\\
# Use 'C-space' for commands
escape ^@^@
# remove some stupid / dangerous key bindings
bind ^k
#bind L
bind ^\
# make them better
bind \\ quit
bind K kill
bind 'W' windowlist
#shell -$SHELL
# change the hardstatus settings to give an window list at the bottom of the
# screen, with the time and date and with the current window highlighted
hardstatus on
hardstatus alwayslastline
hardstatus string "%{.bW}%-w%{.rW}%n %t%{-}%+w %=%{..G} %H %{..Y} %d %M %Y %C%a "
# Startup terminals
screen -t build    1    
screen -t gfish    2
screen -t mysql    3
screen -t ndb      4
screen -t test     5
screen -t irc      6 ssh @ screen -t shell    0 # need to be last to be put first 


Add new comment

Plain text

  • No HTML tags allowed.
  • Quick Tips:
    • Two or more spaces at a line's end = Line break
    • Double returns = Paragraph
    • *Single asterisks* or _single underscores_ = Emphasis
    • **Double** or __double__ = Strong
    • This is [a link]( "The optional title text")
    For complete details on the Markdown syntax, see the Markdown documentation and Markdown Extra documentation for tables, footnotes, and more.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
By submitting this form, you accept the Mollom privacy policy.