Super User is a question and answer site for computer enthusiasts and power users. 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

Whenever I reboot my computer, all GNU screen sessions die. I have to remove them with

screen -wipe

How can I fix that? Telling GNU screen to store sessions in my home directory apparently doesn't help. ($SCREENDIR, see this question).

share|improve this question
up vote 4 down vote accepted

Generally, you can't return to sessions after rebooting. The screen sessions contain session information that is relevant to running processes.

There are two options that I'm aware of which get close to resurrection.

First, you can put some startup screens in your .screenrc, like this:

# ------------------------------------------------------------------------------
# ------------------------------------------------------------------------------

screen bash
screen emacs -nw
chdir /home/me/src
screen -t code

Second, take a look at this project which will

  • Re-create the screen windows
  • Populate them with the session history you once had before the reboot
  • Log you into your previously logged in host via ssh
  • Place you into the same working directory you were once in.

Most of this data is derived from the prompt. Running any previously ran commands would be extremely dangerous, so this is as far as I can get you.

This is done by a cron job which takes periodic snapshots.

My end advice? Try not to reboot :-)

share|improve this answer
Which of these did you like? – Doug Harris Aug 19 '10 at 18:50

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.