Subject: Deatached Sessions Dissapair after reboot.

From: peter holm <[email-masked]>
Date: Wed, 01 Oct 2008 21:22:58 +0200

I am running Ubuntu Hardy
I use screen mostley locallly.
I have this problem.
When i deatacch a screensession and then reboot its gone.

is there anything i can do to make my computer save the sessions between
reboots.?

/Peter

_______________________________________________
screen-users mailing list
[email-masked]
http://lists.gnu.org/mailman/listinfo/screen-users

---

From: Ray Van Dolson <[email-masked]>
Date: Thu, 2 Oct 2008 07:28:33 -0700

> is there anything i can do to make my computer save the sessions between

No.  The actual shell process gets killed on reboot.  There would be
nothing for the session data to point to any longer.

Ray

---

From: [email-masked]
Date: Thu, 2 Oct 2008 15:43:09 +0100

I generally have long running screen sessions that have certain
windows open, not always the same so not worth setting in .screenrc.
Is it possible for screen to save session? Or at least just save the
window name, number, path and just some basic info that would be able
to use to reopen the same configuration?

Sorry if this is seen as ambushing the thread I thought it was a
relavent enough question to ask in this thread.

---

From: [email-masked] (Trent W. Buck)
Date: Fri, 03 Oct 2008 09:46:53 +1000

peter holm <[email-masked]>

> is there anything i can do to make my computer save the sessions between

Like all other processes, the screen session's status is stored in
volatile memory.  That means when the hardware loses power, the process
state vanishes.  Nothing you can do inside screen can stop this.

What you *can* do is investigate the ACPI sleep status sometimes called
"suspend to ram" or "suspend to disk".  The former will put your machine
into a low-power mode, but still provide power to the volatile memory.
The latter, which is probably what you want, writes a copy of the
volatile memory to a swap partition, and restores it when you turn the
machine back on.  This gives you (some) benefits of an always-on machine
without the continuous power consumption.

---

From: Erik Osheim <[email-masked]>
Date: Thu, 2 Oct 2008 19:59:16 -0400

> relavent enough question to ask in this thread.

It might be possible for screen to detect what it "thinks" is the last
command you ran in each window, and write that out to a file. Just off
the top of my head, here are the problems with that:

1. Job control/shell tricks

2. Whether to re-run commands from absolute or relative locations (e.g.
if you are in ~/alpha, run "xyz ./foo", then later resume from ~/beta,
should you do "xyz ./foo" or "xyz ~/alpha/foo".

3. Commands you would not want to repeat (e.g. rm, cvs, svn, dd, tar,
mv, cp, gunzip, yum, apt-get, etc.)

The recurring theme is that commands would very probably go wrong,
potentially catastrophically wrong, and that users would probably not
want a 95% success for a mildly convenient action if 5% of the time
something really horrible happened. For commands that it's (presumably)
always safe to run a .screenrc or script is much more reliable than
this sort of feature.

I imagine it would probably be possible to save a log of what windows
existed with some info, so that if screen crashes you could at least
see what was going on, but that's about it.

-- Erik

P.S. It's certainly true that many of my coworkers are surprised to
see their screen sessions die when the servers get turned over every
year or so. People expect this feature, despite its complexity.

---

From: "Aaron Davies" <[email-masked]>
Date: Fri, 3 Oct 2008 08:37:12 +0800

> is there anything i can do to make my computer save the sessions between

well, there's CryoPID....
-- 
Aaron Davies
[email-masked]