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: List-Subscribe: List-Archive: List-Post: List-Help: , 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: Cc: Xuehan Xu Reply-To: cygwin AT cygwin DOT com From: Jon Turney 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: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit 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