Wednesday, November 10, 2010

Reusing screen sessions

Screen is the only way I can keep myself organized, especially given the limited window manager on a mac. In the past I've always only had one terminal running screen and let all other terminals just run straight. This resulted in some awkward workflows however when everything I wanted to get at was in one of the screen tabs. The solution? screen -xRRA

Let's break it down:
x: Attach to a not detached screen session

RR: Attempts to reconnect to the first detached screen session it can find. Otherwise it creates a new screen session.

A: Adjust screen to the size of this terminal instead of resizing the terminal

Ta-da! The same screen session's now in as many terminals as you want.

This tip thanks to Matthew Brewer

No comments:

Post a Comment