delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2021/11/22/19:08:21

X-Recipient: archive-cygwin AT delorie DOT com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A3DB23858417
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
s=default; t=1637626099;
bh=C8C70BwzHLh9CKTXN+7RCtX6G9vFmE04QlFBFgt9CzM=;
h=Date:To:Subject:In-Reply-To:References:List-Id:List-Unsubscribe:
List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:
From;
b=gNSZCD0dtLQKn91GHwJPyJgaw+y+vqc1BcgTyJztw/BdSkq8UCZ+zP+YMuDxDAI6S
k3wFy+Kwsd7iOUb+llhMxWLrCujENVohNDgF4xqS2Vm2MISHGvxmAUmkTI6iMIDx31
Ol/o9MioZbhOP4EH8NQDN3Zpmd0JbVq8aMcfCnmQ=
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 2ABFC3858409
DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-04.nifty.com 1AN07J69016714
X-Nifty-SrcIP: [110.4.221.123]
Date: Tue, 23 Nov 2021 09:07:28 +0900
To: cygwin AT cygwin DOT com
Subject: Re: bat File to Launch Remote X11 Application
Message-Id: <20211123090728.5af5b26a25220b55dec148bc@nifty.ne.jp>
In-Reply-To: <b1d63a2e-6399-5171-f642-e964a3fcb1e3@bellsouth.net>
References: <b1d63a2e-6399-5171-f642-e964a3fcb1e3 DOT ref AT bellsouth DOT net>
<b1d63a2e-6399-5171-f642-e964a3fcb1e3 AT bellsouth DOT net>
X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.30; i686-pc-mingw32)
Mime-Version: 1.0
X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00, DKIM_SIGNED,
DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, NICE_REPLY_A, RCVD_IN_DNSWL_NONE,
SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4
X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on
server2.sourceware.org
X-BeenThere: cygwin AT cygwin DOT com
X-Mailman-Version: 2.1.29
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Unsubscribe: <https://cygwin.com/mailman/options/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=unsubscribe>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-request AT cygwin DOT com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=subscribe>
From: Takashi Yano via Cygwin <cygwin AT cygwin DOT com>
Reply-To: Takashi Yano <takashi DOT yano AT nifty DOT ne DOT jp>
Errors-To: cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com
Sender: "Cygwin" <cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com>

On Mon, 22 Nov 2021 14:15:32 -0500
Dennis Putnam wrote:
> I have a remote X application on a Linux system that I want to launch 
> with a Windows bat file. My main problem is how to determine if Cygwin/X 
> is running and if not launch it. Once verified I think all I need to do 
> is use SSH -Y with the command that starts the X application. Can 
> someone help? TIA.

What about something like:

set DISPLAY=:0
for /f "usebackq delims=" %%A in (`tasklist ^|find /C "XWin"`) do if %%A==0 start C:\cygwin64\bin\XWin %DISPLAY% -multiwindow
c:\cygwin64\bin\ssh -Y 192.168.0.133 xterm

Note that the above bat fails to start XWin if it is already
started with DISPLAY other than :0.

-- 
Takashi Yano <takashi DOT yano AT nifty DOT ne DOT jp>

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

- Raw text -


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