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:message-id:date:from:reply-to:mime-version:to :subject:references:in-reply-to:content-type :content-transfer-encoding; q=dns; s=default; b=ZCowShTP07p39tfD Tvd4ZUeuAOreTKqebAWtugsPl4QznYiPuiwwKpdWHDwFB5yNXMv+MEd1Z1FKOIQS NkB6qiuadoFIDwj4WIazziMKPgdzgR3QAPWwua3dFhki2NJYoeWszxOv22Q+xkPM gdMs/vAZcsDUEATLtANo1jIdKN4= 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:message-id:date:from:reply-to:mime-version:to :subject:references:in-reply-to:content-type :content-transfer-encoding; s=default; bh=c9b2jqNTqS7BquH/ubb3fR bDREE=; b=EaWAXycKSKRatYBhHYk0wl2uBk6eYUzCZE7WJ7o6Un8CpU9UVCnQcJ 0GcJ06YmVjl7mBQSj/Z9BPin5cCE9kTQHYcQrz6xRnlEpVvy3qN/3E51ihptEOsr MicewOuFdQUw26wMMRAyipWoPZEoJYJ2mgSjzjZ/CbIelgjfaGLas= 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=-2.3 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: csmail.cs.umass.edu Message-ID: <543FDEB6.7060302@cs.umass.edu> Date: Thu, 16 Oct 2014 11:05:26 -0400 From: Eliot Moss Reply-To: moss AT cs DOT umass DOT edu User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: Re: Starting mintty via run.exe References: <1413470693 DOT 33063 DOT YahooMailNeo AT web162805 DOT mail DOT bf1 DOT yahoo DOT com> In-Reply-To: <1413470693.33063.YahooMailNeo@web162805.mail.bf1.yahoo.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes On 10/16/2014 10:44 AM, John Wiersba wrote: > I'm trying to create a windows shortcut which will start mintty indirectlyby running a (perl) script which will exec mintty. I know I can start mintty.exe directly via the shortcut, but the purpose of my script is to wrap the invocation in the proper environment and arguments. > I'm encountering two problems using run.exe: > > 1) run.exe doesn't seem to be able to run a hashbang script. My script starts with #!/usr/bin/perl and runs just fine from a cygwin bash command line, starting a new mintty terminal as expected. But calling it from run.exe fails. It flashes some kind of terminal window on the screen, which appears to have no content (but it is hard to tell, since it flashes so quickly) and then the terminal window immediately closes. In this case, my shortcut target is: d:\cygwin\bin\run.exe /path/to/hashbang/script. I think it may be designed to deal only with actual executables (.exe files). The wording of the man page is ambiguous, but suggestive of this in that it speaks of "Windows programs". So maybe you want: run /bin/bash -c /path/to/hashbang/script This worked for me with a trival mintty-starting hash-bang bash script. Regards -- Eliot Moss -- 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