delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2015/10/29/09:23: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:reply-to:from
:message-id:date:mime-version:in-reply-to:content-type
:content-transfer-encoding; q=dns; s=default; b=EVLcE1YRnPC1C40G
20IMeXUM4gjrT5rgGu2AWf4Rsdb7QkSxmd8rUDO7LPUt1hXR8PcKv0lGfUm2Y2NF
zJ2l27Ka72OYyKiSqHtvQg8Giy6tkgkkE8b8C4yY6FTu3DPUNInhr0lfBph2fgMs
Boi+FnSpTwLous2qiZKXWaVyp/8=
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:reply-to:from
:message-id:date:mime-version:in-reply-to:content-type
:content-transfer-encoding; s=default; bh=Y+TBbvgE9AN5yCi9YuTjMI
H7L78=; b=fNsAOx6que2+VdaQw+pa07MKsjfV/nWCPUN2nU6FsyYy0yl8QGNZlU
xreSgRh1Vie72a0oLDYI5SeIuYPnwwy6kBDjRcTc61Ct03b/rwzIFVhbt8s+lNud
e1sQiMeiYf4KZrP5dBMKHCs+/BFPd0KjpAWKNJ1lrX5v5+kx9+DWk=
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=-0.3 required=5.0 tests=AWL,BAYES_50,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2
X-HELO: out4-smtp.messagingengine.com
Subject: Re: How to run xinit without first entering a cygwin terminal
To: cygwin AT cygwin DOT com
References: <CAJACTudb8DzgcpxEF-G730eBptRV8ELc-+x6s9CMhcgwi1Vfxg AT mail DOT gmail DOT com>
Cc: Xuehan Xu <xxhdx1985126 AT gmail DOT com>
Reply-To: cygwin AT cygwin DOT com
From: Jon Turney <jon DOT turney AT dronecode DOT org DOT uk>
Message-ID: <56321DC3.2030704@dronecode.org.uk>
Date: Thu, 29 Oct 2015 13:23:15 +0000
User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0
MIME-Version: 1.0
In-Reply-To: <CAJACTudb8DzgcpxEF-G730eBptRV8ELc-+x6s9CMhcgwi1Vfxg@mail.gmail.com>

On 29/10/2015 06:25, Xuehan Xu wrote:
> Hi, everyone
>
> I'm trying to run xinit.exe to start a GUI program in a windows cmd
> prompt. The command I run:
>
> "c:\cygwin\bin\run.exe /usr/bin/bash.exe -l -c /usr/bin/xinit.exe
> /home/Administrator/rdesktop.exe -f 192.168.1.79
>
> But, it seems that rdesktop.exe isn't running, the window was just
> showing a terminal prompt.

Using the command lines from the start menu items created for the xinit 
package as a template (see [1]), I think you need something like:

c:\cygwin\bin\run.exe -quote /usr/bin/bash.exe -l -c "/usr/bin/xinit.exe 
/home/Administrator/rdesktop.exe -f 192.168.1.79"

The command string being given to bash -c needs quoting, otherwise 
subsequent words are assumed to be parameters to that command.

run needs to be given the -quote option to protect those quotes.

[1] http://x.cygwin.com/docs/faq/cygwin-x-faq.html#q-command-line-args

-- 
Jon TURNEY
Volunteer Cygwin/X X Server maintainer

--
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