Tell GNU screen where to save the sessions?

9

1

My GNU screen stores its sessions in the /tmp directory.

That means that after a reboot, all sessions are lost:

$ screen -list 
No Sockets found in /tmp/uscreens/S-dehmann.

How can I tell it to store them in a specific directory in my home directory, where they won't be lost so easily?

dehmann

Posted 2010-03-06T21:47:49.940

Reputation: 1 853

2What good are the sockets after a reboot? The controlling SCREEN process, and all its children will have been terminated. – neirbowj – 2013-08-19T16:43:49.307

Answers

10

From the manual:

The "socket directory" defaults either to $HOME/.screen or simply to
/tmp/screens or preferably to /var/run/screen chosen at  compile-time...

By setting the environment variable SCREENDIR you can change the default behavior.

mrucci

Posted 2010-03-06T21:47:49.940

Reputation: 8 398