Your Best .screenrc Files Are Wanted!

Screen. I love it and you should too. Unless you like tmux, in which case you probably nag me all the time on Twitter to switch to BSD.

If you use it all the time then you undoubtedly have a .screenrc file (or files) that you port around to your jump hosts and servers in general. I’ve combed the internet and found some rather elaborate ones. Others seem ingenious and others seem… well… too incomprehensible by me to accurately determine their relative blends of insanity and brilliance.

If you have a .screenrc file, no matter how simple or complex, hit me up. I’d like to make a post for each person’s .screenrc file(s) to share the wealth and get some good discussion going. Or maybe it’s just one or two options that you constantly define to saves time and hairlines. For example, how do you like to set up hardstatus?  Any bindKey trickery that you like? How do you deal with the shell option? $TERM type?

Comment below, email me at [email protected], tweet at me, G+ me, whatever. I can get you set up to make your own post or just post it myself using your commentary on your own .screenrc file. Don’t feel that your uses for .screenrc are too few or not unique enough. Someone can gain from it. Don’t worry if you’re reading this post years after it was published. I’m still interested! I’ll collect all posts and create an index of them on a master page for quick reference.

And if you really demand it… okay, okay, I’ll make a call for .tmux.conf files sometime. =)


  1. Chris

    June 23, 2014 at 5:45 am

    Using tmux doesn’t necessitate a move to BSD—but we won’t object. 😉 However, in reference to your previous post, I will point out , which can toggle the ‘wuff wuff!’ and similar messages (if you’ve ever seen screen say “the dungeon collapses around you”, and wondered what kind of drugs it was on, this setting can make it tell you something more useful). I’m afraid I haven’t used screen in long enough that I can’t remember anything else about what I put in my screen run control file. It was always pretty minimal, though, so not likely useful.


  2. Al Biheiri

    June 23, 2014 at 9:14 am

    only one that matters to me 🙂

    startup_message off


  3. James

    June 23, 2014 at 12:33 pm

    I have my .bash_profile automatically create a .screenrc on certain machines so that it works out how many machines are in a given DC and automatically log in to all the machines in the DC.

    The template looks like:

    startup_message off
    escape ^Vv
    screen -t colomanager
    stuff “watch colomanager.sh32”
    screen -t node1
    stuff “ssh node132”


  4. ilikecheese

    June 25, 2014 at 7:00 am

    startup_message off
    autodetach on
    nonblock on
    defutf8 on

    scrollback off

    caption always “%{= kw}%-w%{= BW}%n %t%{-}%+w %-= %c”

    screen -t music 0 ncmpcpp
    screen -t bash 1 bash
    screen -t irssi 4 irssi -c “”
    screen -t htop 5 htop
    screen -t mutt 6 mutt
    select 1

    Easier view on tabs with titles


  5. Ivan Richwalski

    July 2, 2014 at 4:23 am

    I’ve been using this hardstatus setup for many years now. It took time to build up to what it is, and I made sure to
    document how the various escape sequences work because screen’s documentation is pretty sparse. It shows xterm title string on the far left (set by my shell prompt containing the xterm title sequence to set the title to the hostname ), with date and time on the far right. The window list occupies most of the string, and will “scroll” to keep the current window number displayed.

    ## Normal hardstatus explained
    ## %{bw} color: white on blue
    ## [
    ## %{Y} color: bright yellow
    ## %h xterm title string
    ## %011= pad out a total of 11 characters
    ## %{-} pop last color change
    ## ]
    ## +01= pad another space, to keep later truncation from eating the “]”
    ## %{Kw} color: white on grey (“bright black”)
    ## %-w lower half of window list
    ## %50L> Mark this spot for truncating at 50% width
    ## %{yk} color: black on yellow
    ## %{Y.} color: Bright yellow background
    ## %n current window number
    ## %{-} pop last color change
    ## %t current window title
    ## %{-} pop last color change
    ## %+w upper half of window list
    ## %-012= pad all the way out to ( window width – 12 )
    ## %{y} color: yellow
    ## %m/%d %c month/day and time ( as XX/XX XX:XX )
    hardstatus string “%{bw}[%{Y}%h%011=%{-}]%+01=%{Kw} %-w%50L>%{yk}%{Y.}%n%{-} %t%{-}%+w %-012=%{y} %m/%d %c”


  6. Fran Garcia

    August 13, 2014 at 1:34 pm

    I’m mostly using David Kauffman’s .screenrc . I can’t seem to locate the original source at his website, so I’ll paste some random URL that contains it 🙂


  7. Miksa

    February 20, 2015 at 1:26 pm

    Can anyone figure a way how to use just “§” as the escape character? I haven’t been able to make it work on screen or tmux. On fin/swe keyboards § is at the corner next to 1 and Tab and never in my life have I written a text where I have used. It’s the most valuable wasted key on these keyboards.


Leave a Reply

Your email address will not be published. Required fields are marked *

Follow TheNubbyAdmin!

follow us in feedly

Raw RSS Feed:

Contact Me!

Want to hire me as a consultant? Have a job you think I might be interested in? Drop me a line:

Contact Me!

Subscribe via Email

Your email address is handled by Google FeedBurner and never spammed!

The Nubby Archives

Circle Me on Google+!

Photos from Flickr

Me on StackExchange

The IT Crowd Strava Group