From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 92518 invoked by alias); 2 Jun 2016 17:50:30 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 92497 invoked by uid 89); 2 Jun 2016 17:50:29 -0000 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 Received: from smtp.ht-systems.ru (HELO smtp.ht-systems.ru) (78.110.50.177) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Thu, 02 Jun 2016 17:50:19 +0000 Received: from [95.165.144.62] (helo=darkdragon.lan) by smtp.ht-systems.ru with esmtpa (Exim 4.80.1) (envelope-from ) (Authenticated sender: postmaster@rootdir.org) id 1b8Wl4-00081x-4i ; Thu, 02 Jun 2016 20:50:14 +0300 Received: from [192.168.1.10] (HELO daemon2.darkdragon.lan) by daemon2 (Office Mail Server 0.8.12 build 08053101) with SMTP; Thu, 02 Jun 2016 17:41:47 -0000 Date: Thu, 02 Jun 2016 17:50:00 -0000 From: Andrey Repin Reply-To: cygwin@cygwin.com Message-ID: <602832425.20160602204147@yandex.ru> To: Christoffer Aasted , cygwin@cygwin.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 X-SW-Source: 2016-06/txt/msg00026.txt.bz2 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