Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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
add comment

1 Answer 1

up vote 3 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:

# ------------------------------------------------------------------------------
# STARTUP SCREENS
# ------------------------------------------------------------------------------

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
add comment

Your Answer

 
discard

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.