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.

I've seen this question and this question, but neither of them apply to me. I have the socket file in /var/run/screen and I own it - but screen -list doesn't recognize it and allow me to connect. How can I recover this session?

tom@host~ $ ls /var/run/screen/S-tom/
total 0
prw------- 1 tom people 0 Jul  2 19:07 3954.pts-0.host

tom@host ~ $ screen -list
No Sockets found in /home/tom/.screen.
share|improve this question

1 Answer 1

up vote 4 down vote accepted

You can set the SCREENDIR environment variable to /var/run/screen. You should then be able to list and connect.

Assuming sh compatible shell:

export SCREENDIR="/var/run/screen"

From man 1 screen

ENVIRONMENT
   COLUMNS        Number of columns on the terminal (overrides termcap entry).
   HOME           Directory in which to look for .screenrc.
   LINES          Number of lines on the terminal (overrides termcap entry).
   LOCKPRG        Screen lock program.
   NETHACKOPTIONS Turns on nethack option.
   PATH           Used for locating programs to run.
   SCREENCAP      For customizing a terminal's TERMCAP value.
   SCREENDIR      Alternate socket directory.
   SCREENRC       Alternate user screenrc file.
   SHELL          Default shell program for opening windows (default "/bin/sh").
   STY            Alternate socket name.
   SYSSCREENRC    Alternate system screenrc file.
   TERM           Terminal name.
   TERMCAP        Terminal description.
   WINDOW         Window number of a window (at creation time).
share|improve this answer
    
I have no idea why I had to do this, but it worked! Thank you. –  Tom Ritter Jul 5 '12 at 15:07

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.