X-Recipient: archive-cygwin@delorie.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@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.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 <anrdaemon@yandex.ru>
Reply-To: cygwin@cygwin.com
Message-ID: <602832425.20160602204147@yandex.ru>
To: Christoffer Aasted <chr.aasted@gmail.com>, cygwin@cygwin.com
Subject: Re: Windows shortcut "bash -c" the only way? Naturally it ignores profile and hence locale
In-Reply-To: <CAM9yT0-Y7nJoHuQ_O=F_miMT8y+qAtKYnJA+ceF7DiX8wLwCvA@mail.gmail.com>
References: <CAM9yT0-Y7nJoHuQ_O=F_miMT8y+qAtKYnJA+ceF7DiX8wLwCvA@mail.gmail.com>
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@my.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@my.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

