Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When I restore a splitted session of screen, I've got only one print session and have to reconfigure the number of display session.

Is there another way to have the original screen configuration?

share|improve this question

This is not currently possible without a hack (see next paragraph); however, the features required to do this have already been added to screen's current git tree. In future versions, the "layout save" and "layout load" commands will be able to load not only your last layout, but other named layouts. I believe there is also support for cycling through layouts.

Currently, the trick is to use a screen inside a screen. All of your work and layout changes are done in the inner screen, but then when you detach, you actually detach from the outer most screen. The layout of the inner screen will be preserved. See the following for all the gritty details:

When I split the display and then detach, screen forgets the split.

Alternatively, you can try compiling the latest version directly from the screen source tree. You can do this by installing git and then running:

git clone git://git.savannah.gnu.org/screen.git

Then, follow the directions in src/INSTALL. In general, the directions are:

  1. ./autogen.sh
  2. ./configure
  3. make

There is a discussion in the INSTALL file about various issues surrounding where to install screen based on various concerns. If you go this route, your best bet is to read all of the INSTALL directions and then proceed.

share|improve this answer

I ran into this problem when I pressed a wrong key combination by accident, and all my split screens were gone. :((

However, there was a (humble) way out for me, at least. Since I mostly use screen together with xterm and bash shells, the last thing I wanted to have is launch any more bashes. (Controlling things with ps revealed the bash processes were there, but not accessible.)

So the way to get back to my usual setup was to use Ctrl+" and add one already running shell to each split window, cycling through the "panes" with Ctrl+aTAB. So I got things back to normal.
I'm posting this especially because I've come across people who, in their frustration, just pressed Ctrl+ac and "re-installed" their bashes. But this is silly! For with that method, you will end up with maybe 25 bash processes at the end of the day, with at least 15 of them inaccessible/invisible, just wasting resources and CPU for no reason. So reuse them, instead of recreating them.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.