delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2017/06/23/10:50:40

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:subject:to:references:cc:from:message-id:date
:mime-version:in-reply-to:content-type
:content-transfer-encoding; q=dns; s=default; b=WGyDryZDrrx7GtgB
aa+nmMmndGvq6PzKecxueptxKyiW8QdqRO7HpZ0heBVAMAcbfp9WUDgcRoIp1DQm
QNKNO6CrCTwyCui2GZsDoLtCGJyK2zQ/yfc1xLkVil1pYg+MP0mx8XqHjylffpZ1
g4dD64m39rWcMkPUTbNMOAC3RHo=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:subject:to:references:cc:from:message-id:date
:mime-version:in-reply-to:content-type
:content-transfer-encoding; s=default; bh=2NypiaMidzHRHXi6UjXIMz
yKPZA=; b=YePsRPew2l5jRdcByua6+2oilIq5UWJgeljbNpnKmu1r8yZzqK/hr3
Jyj/sEgOwvzNUI6eyN6vtkPHkgDWBZTSIfVcBG3MB8s//geoRRVQ1MvxIWbgOTMv
9bDraPnZzBc2Ssn+4ThfOZADtIWcq7cr1n6ZBGJblcn0ciaSZoE9g=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
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
X-ME-Sender: <xms:rCpNWX1XO3UIdkAICYN_4tJ8AMjgSKQ2pcSLGCEaj6dGRUQdniLESA>
Subject: Re: Starting a xterm window
To: The Cygwin Mailing List <cygwin AT cygwin DOT com>
References: <CAKqBF1jvZT1ZT30Wcj7x6_o83e4F2Wc2MCpW_o+cwrzVh_V=TQ AT mail DOT gmail DOT com>
Cc: Ugly Leper <ugly DOT leper AT gmail DOT com>
From: Jon Turney <jon DOT turney AT dronecode DOT org DOT uk>
Message-ID: <811e35e5-ba9a-a8e8-9476-1e134ed086a2@dronecode.org.uk>
Date: Fri, 23 Jun 2017 15:50:16 +0100
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: <CAKqBF1jvZT1ZT30Wcj7x6_o83e4F2Wc2MCpW_o+cwrzVh_V=TQ@mail.gmail.com>

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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019