delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2016/06/02/13:50:44

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: <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=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 AT yandex DOT ru>
Reply-To: cygwin AT cygwin DOT com
Message-ID: <602832425.20160602204147@yandex.ru>
To: Christoffer Aasted <chr DOT aasted AT gmail DOT com>, cygwin AT cygwin DOT 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 AT mail DOT gmail DOT com>
MIME-Version: 1.0
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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019