From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13691 invoked by alias); 24 Feb 2015 19:32:29 -0000 Mailing-List: contact cygwin-xfree-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-xfree-owner@cygwin.com Reply-To: cygwin-xfree@cygwin.com Mail-Followup-To: cygwin-xfree@cygwin.com Received: (qmail 13681 invoked by uid 89); 24 Feb 2015 19:32:29 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 X-HELO: out1-smtp.messagingengine.com Received: from out1-smtp.messagingengine.com (HELO out1-smtp.messagingengine.com) (66.111.4.25) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Tue, 24 Feb 2015 19:32:27 +0000 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id E02C222E52 for ; Tue, 24 Feb 2015 14:32:24 -0500 (EST) Received: from frontend1 ([10.202.2.160]) by compute3.internal (MEProxy); Tue, 24 Feb 2015 14:32:25 -0500 Received: from [192.168.1.102] (unknown [31.51.205.191]) by mail.messagingengine.com (Postfix) with ESMTPA id 2F26BC002A4; Tue, 24 Feb 2015 14:32:25 -0500 (EST) Message-ID: <54ECD1C4.8010806@dronecode.org.uk> Date: Tue, 24 Feb 2015 21:00:00 -0000 From: Jon TURNEY Reply-To: cygwin-xfree@cygwin.com User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: cygwin-xfree@cygwin.com CC: fj.mail@gmail.com Subject: Re: Can't open display with PuTTY and xinit 1.3.4-1 References: In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2015-02/txt/msg00077.txt.bz2 On 24/02/2015 16:55, Fj wrote: > On 2015-01-05 05:31, Laurens Blankers wrote: >> When using PuTTY with X11 forwarding enabled X clients are no longer > able to connect to the X server running locally. When reverting back to > 1.3.2-1 the problem goes away. > >> This may be related to the -nolisten tcp which is now the default[1]. If > this is indeed the case it would be create of adding the '-listen' flag > to startxwin could be added to the FAQ. Or another, more secure, > solution would also be appreciated. > > Hi, I updated Cygwin today and hit the same problem, except even after > I added "-listen tcp" xterm (and gvim) still refused to work > complaining about "No protocol specified" (before was: "Can't open > display"). The "No protocol specified" message is a bit obtuse. It comes back from the server when an attempt is made to open a connection, and really means something like "Authorization required, but no authorization protocol specified" - the server was started with an authorization file using the -auth option, but the client didn't offer any authorization data. > Putty logs say "Opening X11 forward connection succeeded" (before > "-listen tcp" it was: "Forwarded X11 connection terminated due to > local error"), which seems to indicate that the problem is with the X > server (and the way xterm/gvim communicate with it). I'm afraid it seems '-listen tcp' is not enough for PuTTY to successfully connect. If the server was started with -auth (which startxwin does since xinit-1.3.4-1), then PuTTY will need authorization data to successfully connect. Whilst you can do this by setting the "X authority file for local display" in PuTTY's configuration to the Windows path equivalent to ~/.serverauth.NNNN, this isn't much of a solution as this filename changes everytime the server is started. Perhaps xinit needs an option to avoid using -auth? One can demonstrate that works by starting the server directly, e.g. using 'XWin -multiwindow -listen tcp' rather than 'startxwin'. Definitely some sort of change is needed to make this work better. > Ssh-ing to the server from Cygwin terminal works and I can even launch > gvim from the Putty's tty by specifying the same DISPLAY the Cygwin > connection provides. > > After reverting to some early 2014 version of xinit and xorg (thank > god for Cygwin Time Machine) everything resumed working properly. > > (on a side note, I tried to figure out what are the possible "-listen" > options by looking at the xserver code, there are three, "tcp", > "unix", "local". What does "local" mean, couldn't it be loopback > adapter? Where is "_XSERVTransNoListen" function implemented?) I think "local" is an alias for "unix", which uses a UNIX domain socket (as emulated by cygwin) _XSERVTransNoListen is implemented (via some macros) in libXtrans. -- Jon TURNEY Volunteer Cygwin/X X Server maintainer -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://x.cygwin.com/docs/ FAQ: http://x.cygwin.com/docs/faq/