GNU screen on Cygwin: Cannot seem to reattach, no matter what I try

Andrew Schulman schulman.andrew@epamail.epa.gov
Sun May 8 21:12:00 GMT 2011


Hi Doug.

> Thanks so much for your efforts to port and maintain the GNU screen 
> program to Cygwin!   I used to use screen all the in the pre-GUI days, 
> and now I use ssh regularly for the occasions I need to run something on 
> a real win32 or win64 platform.  Being able to use screen again would be 
> great, especially because I routinely get disconnected from one machine 
> in particular due to a lousy DSL line.
> 
> At any rate, although I can run screen just fine, I cannot reattach, no 
> matter what I do, even when there's been no disconnect and I've simply 
> manually detached (i.e., Ctrl-A d).  The session log below pretty much 
> says it all.
> 
> Note that I move my .screenrc file out of the way to ensure I'm running 
> with nothing but default settings.  Also, you'll notice in the output 
> from "ps aux" that the "screen" process, once detached, has a tty value 
> of "?", whereas all the others have a tty number.  Other than this, 
> though, everything works just as one would expect.  Processes continue 
> to run fine under screen even when detached: I simply just cannot 
> reattach.  As you can also see below, doing a "kill -15" on screen 
> causes it do a proper shutdown and remove the socket file.

<snip>

> ----- begin session log -----
> 
> morse@dougsdell ~> screen --version
> Screen version 4.00.03 (FAU) 23-Oct-06
> morse@dougsdell ~> uname -a
> CYGWIN_NT-5.1 dougsdell 1.7.9(0.237/5/3) 2011-03-29 10:10 i686 Cygwin
> 
> morse@dougsdell ~> mv .screenrc screenrc
> morse@dougsdell ~> screen                  [ <--- I press Ctrl-A d here ]
> [detached]
> 
> morse@dougsdell ~> screen -r
> There is a screen on:
> There is no screen to be resumed.
> 
> morse@dougsdell ~> screen -ls
> There is a screen on:
> 1 Socket in /tmp/uscreens/S-morse.
> morse@dougsdell ~> l /tmp/uscreens/S-morse/
> total 16
> srw-r--r-- 1 morse None 0 May  7 15:45 3932.tty1.dougsdell
> morse@dougsdell ~> screen -r 3932.tty1.dougsdell
> There is a screen on:
> There is no screen to be resumed matching 3932.tty1.dougsdell.
> 
> morse@dougsdell ~> ps aux
>        PID    PPID    PGID     WINPID  TTY  UID    STIME COMMAND
>       2396       1    2396       2396  con 1005 22:59:53 /usr/bin/rxvt
> I    2412    2396    2412       2428    0 1005 22:59:53 /usr/bin/bash
>       2080    3408    2080       1780    1 1005 15:41:47 /usr/bin/bash
>       3932       1    3932       3932    ? 1005 15:45:49 /usr/bin/screen
> I    3376    3932    3376       3460    2 1005 15:45:49 /usr/bin/bash
>       2168    2080    2168       2212    1 1005 15:46:32 /usr/bin/ps
> morse@dougsdell ~> kill -15 3932
> morse@dougsdell ~> ps aux
>        PID    PPID    PGID     WINPID  TTY  UID    STIME COMMAND
>       2396       1    2396       2396  con 1005 22:59:53 /usr/bin/rxvt
> I    2412    2396    2412       2428    0 1005 22:59:53 /usr/bin/bash
>       2080    3408    2080       1780    1 1005 15:41:47 /usr/bin/bash
>       2228    2080    2228       2076    1 1005 15:46:45 /usr/bin/ps
> morse@dougsdell ~> screen -ls
> No Sockets found in /tmp/uscreens/S-morse.
> morse@dougsdell ~> l /tmp/uscreens/S-morse/
> total 0
> 
> morse@dougsdell ~> echo "help! :)"
> help! :)
> 
> ----- end session log -----

Sorry you're having trouble.  I have a few suggestions/comments:

* Please send output of `cygcheck -svr`, so we can see that your installation is
complete.

* A TTY value of ? in ps is normal for the background screen process.

* Read /usr/share/doc/screen/README.Cygwin - there are descriptions there of
known problems with reattachment.  But mostly it has to do with using screen in
a DOS terminal.  

* What terminal types are you using?  rxvt and ssh login?  Any others?  Do you
have the same problem with local vs. remote login, and different local terminal
types?

* On my host, where screen works fine, the permissions on the socket are 0600.
Does 'chmod 0600 /tmp/uscreens/S-morse/*' allow you to reattach?

All of this is pretty thin.  Unfortunately, over the years some people have
reported problems reattaching to screen in Cygwin.  Some careful debugging of
the foreground and background screen sessions could probably find the problem,
but I don't have the time or skill to do it.

Any suggestions from other screen users?

Andrew.


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple



More information about the Cygwin mailing list