Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

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

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?

share|improve this question
1  
What good are the sockets after a reboot? The controlling SCREEN process, and all its children will have been terminated. – neirbowj Aug 19 '13 at 16:43
up vote 8 down vote accepted

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.

share|improve this answer

You must log in to answer this question.

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