X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-1.5 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,TW_RX,TW_SR,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org To: cygwin AT cygwin DOT com From: Andrew Schulman Subject: Re: GNU screen on Cygwin: Cannot seem to reattach, no matter what I try Date: Sun, 08 May 2011 17:12:30 -0400 Lines: 101 Message-ID: References: <20110508194037 DOT GA15550 AT ikrg DOT com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Archive: encrypt X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com 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. > ----- begin session log ----- > > morse AT dougsdell ~> screen --version > Screen version 4.00.03 (FAU) 23-Oct-06 > morse AT dougsdell ~> uname -a > CYGWIN_NT-5.1 dougsdell 1.7.9(0.237/5/3) 2011-03-29 10:10 i686 Cygwin > > morse AT dougsdell ~> mv .screenrc screenrc > morse AT dougsdell ~> screen [ <--- I press Ctrl-A d here ] > [detached] > > morse AT dougsdell ~> screen -r > There is a screen on: > There is no screen to be resumed. > > morse AT dougsdell ~> screen -ls > There is a screen on: > 1 Socket in /tmp/uscreens/S-morse. > morse AT dougsdell ~> l /tmp/uscreens/S-morse/ > total 16 > srw-r--r-- 1 morse None 0 May 7 15:45 3932.tty1.dougsdell > morse AT dougsdell ~> screen -r 3932.tty1.dougsdell > There is a screen on: > There is no screen to be resumed matching 3932.tty1.dougsdell. > > morse AT 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 AT dougsdell ~> kill -15 3932 > morse AT 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 AT dougsdell ~> screen -ls > No Sockets found in /tmp/uscreens/S-morse. > morse AT dougsdell ~> l /tmp/uscreens/S-morse/ > total 0 > > morse AT 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