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:date:from:reply-to:message-id:to:subject :in-reply-to:references:mime-version:content-type :content-transfer-encoding; q=dns; s=default; b=So/G3lA6k14+cb3b UNe2n6vGEqKg08u2K4oQD/bYf7gV3RpX6mh47Ti8XofwTbJc3y1u/AqCdptez2XP /BGPPXr/aElHKpxBAKXLs+8bhMKj84Tq/3qvI0yaRncFpAlwBoKXbBqGs2qiNqWf jVFKTcSH6XPF7SjX55JJbT9uV/g= 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:date:from:reply-to:message-id:to:subject :in-reply-to:references:mime-version:content-type :content-transfer-encoding; s=default; bh=VqvxbqBlIrdF2dvn3QXoYR tiPwQ=; b=escFrCXT8bl4XlFs9lcy6bnSGj7dmynnOIKlIg7sj2kWtxNoOwYEeu oeHCxhzlU3HW8cray8SiaFpDGHSet/oVDPUuBLhHSLVM6nor4IWjhXG7+VgS3i3e 1kYV2WMq1KzfGUgtz8YH8Xy3s6PwYmHSbgkDmUdf6xOjVZIGYESwU= 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=4.0 required=5.0 tests=AWL,BAYES_50,FREEMAIL_FROM,KAM_THEBAT,SPF_SOFTFAIL autolearn=no version=3.3.2 spammy=H*UA:Bat!, H*x:Bat!, H*r:sk:postmas, H*UA:Home X-HELO: smtp.ht-systems.ru Date: Thu, 2 Jun 2016 20:41:47 +0300 From: Andrey Repin Reply-To: cygwin AT cygwin DOT com Message-ID: <602832425.20160602204147@yandex.ru> To: Christoffer Aasted , cygwin AT cygwin DOT com Subject: Re: Windows shortcut "bash -c" the only way? Naturally it ignores profile and hence locale In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Greetings, Christoffer Aasted! > Hello Cygwin. > I struggle in creating a Windows shortcut that launches a command and > initializes the environment the way that the Cygwin64 Terminal > initializes. > C:\cygwin64\bin\mintty.exe /bin/bash -l -c "set ssh -t cha AT my DOT host > screen -r -d weechat" Why "set" ? > I am aware that "bash -c" behaves much differently and does source > $HOME shell customizations /etc/profile, .bash_profile, .profile - > right? > I thought "-l" login shell was the solution. > I tried sourcing /etc/profile; .bash_profile and .profile but this > doesn't make fix anything. > C:\cygwin64\bin\mintty.exe /bin/bash -l -c "source /etc/profile; set > ssh -t cha AT my DOT host screen -r -d weechat" > The issue is that LANG is not properly set and even if I set it > manually before entering SSH with a "LANG=en_US.UTF-8" (where I know > my host has the locales properly set). > Why would we have to run "bash -c" on shortcuts ? Isn't sending a > command to mintty.exe supported or is the culprit cygwin? Normally, I just run shell scripts directly. (Well, almost.) I don't understand your struggle. May be you should just remove "set" ? -- With best regards, Andrey Repin Thursday, June 2, 2016 20:39:51 Sorry for my terrible english... -- 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