4

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).

1 Answer 1

6

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 :-)

1
  • Which of these did you like? Commented Aug 19, 2010 at 18:50

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .