Friday, November 4

screen is the Best Thing Ever

I love GNU screen. It’s a great feeling to be able to start work on my desktop, then maybe go to the couch and do some more, or even work from home for a day and pick up exactly where I left off.

It’s been especially good this past week when I was build engineer for Blogger. I could be assured that even if I closed my laptop, or lost connectivity, or was forced to restart by a system update, a build or push would continue and I could re-connect with the associated shell whenever I wanted to.

Get started: GNU Screen by Jonathan McPherson

More tips: MacOSXHints article

My advice:
  1. Automatically start screen in your bashrc. Otherwise, the term you want to connect to will always be the one you forgot to start screen in.
  2. Give your screen sessions names. I have a key shortcut in my window manager that pops up a box for me to type a name in, and it will open a terminal with that screen session in it (creating it if necessary). It’s much easier to connect to “CodeReview” than “16092.pts-4.lukey.”
  3. Likewise, I have a script on my laptop that takes a session name on the command line and sshs and brings up that screen instance in one step.