From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20290 invoked by alias); 23 Jun 2017 14:50:23 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 20270 invoked by uid 89); 23 Jun 2017 14:50:22 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.2 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 spammy=Ugly, DISPLAY, leper, Leper X-HELO: out3-smtp.messagingengine.com Received: from out3-smtp.messagingengine.com (HELO out3-smtp.messagingengine.com) (66.111.4.27) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 23 Jun 2017 14:50:21 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 0D0A520AF0; Fri, 23 Jun 2017 10:50:20 -0400 (EDT) Received: from frontend2 ([10.202.2.161]) by compute6.internal (MEProxy); Fri, 23 Jun 2017 10:50:20 -0400 X-ME-Sender: Received: from [192.168.1.102] (host86-158-32-120.range86-158.btcentralplus.com [86.158.32.120]) by mail.messagingengine.com (Postfix) with ESMTPA id 89DA02480C; Fri, 23 Jun 2017 10:50:19 -0400 (EDT) Subject: Re: Starting a xterm window To: The Cygwin Mailing List References: Cc: Ugly Leper From: Jon Turney Message-ID: <811e35e5-ba9a-a8e8-9476-1e134ed086a2@dronecode.org.uk> Date: Fri, 23 Jun 2017 14:50:00 -0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.2.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2017-06/txt/msg00287.txt.bz2 On 09/06/2017 11:14, Ugly Leper wrote: >>> /usr/bin/xterm: Xt error: Can't open display: :0.0 >>> /usr/bin/xterm: DISPLAY is not set > > Thanks for all suggestions. Both the following fragments seem to work > flawlessly. Both incorporate a waiting time for XWin to gain traction > before xterm is called: > > 1. Starting a xterm console from a .cmd file in a Windows Command > Prompt box: include the lines > > bin\run bin\XWin -clipboard -nolock -multiwindow 2>nul > timeout 2 > nul 2> nul > bin\xterm -display :0.0 > > 2. Starting a xterm console from a script in a bash (or mintty) shell: > include the lines > > run XWin -clipboard -nolock -multiwindow 2>/dev/null & > sleep 2 > /bin/xterm -display :0.0 > > You can vary the pause e.g. timeout 3 or sleep 4. Maybe as brief a > fuse as timeout 1 or sleep 1 will be adequate; but that would make me > nervy about getting the same failure as in >> at the top of this post. You could also write something like 'startxwin /usr/bin/xterm -- -nolock' You might want to take a look at the manpages for xinit, startx, startxwin. These are the standard tools for starting an X server and client(s), while allowing for the fact that the X server is not ready to accept connections instantly after being started. -- 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