From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 104487 invoked by alias); 2 Jun 2016 17:53:06 -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 104031 invoked by uid 89); 2 Jun 2016 17:53:05 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.4 required=5.0 tests=AWL,BAYES_40,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=D*yandex.ru, Repin, repin, Aasted! X-HELO: mail-wm0-f53.google.com Received: from mail-wm0-f53.google.com (HELO mail-wm0-f53.google.com) (74.125.82.53) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Thu, 02 Jun 2016 17:52:55 +0000 Received: by mail-wm0-f53.google.com with SMTP id a20so76884343wma.1 for ; Thu, 02 Jun 2016 10:52:55 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to; bh=XGyGm/X0dSaScmt3QitmyF34xzbO1cijX5NdHd1Psks=; b=Wp2BXLl/Hy/NuVlDHBjlXXfHG5tKc8FJBdI9qkLu/inK45NIA8B7Eu6UbePvlVhopU P8A3J8xPr+FSPc5rf0OAYJifTuIdJSbF5DZkywm+M08spGmIQiO8QqMwh7Pqr/iXCVHo U8v+84s/tj1GElcfF0SGEiO1QZc2GZXQnSSZ/HuQwHLzAkBt5kpVhav0eCv7yfLoOsrT vluZTxgWijxlT4ZtQicpABanZDUb/h4qBwXPkuOoWde+//i7mGmMoccTo6keSh/m6u0g S8QTvxQLh+tUIfoTSvKqueOXBD5u08ztmfELN/mzauS3XZ6X7R/4zb3AIhAK3OiH429J 6oVA== X-Gm-Message-State: ALyK8tISZo5tQ1HJjXA1SU5G6bo2O7mWKHzKE9L8rdat5f1JL6SfNBO1f+yGioHe408iPdHQ4mlr/WvAb1OpOA== X-Received: by 10.194.86.133 with SMTP id p5mr9411829wjz.67.1464889972610; Thu, 02 Jun 2016 10:52:52 -0700 (PDT) MIME-Version: 1.0 Received: by 10.28.229.208 with HTTP; Thu, 2 Jun 2016 10:52:13 -0700 (PDT) In-Reply-To: <602832425.20160602204147@yandex.ru> References: <602832425.20160602204147@yandex.ru> From: Christoffer Aasted Date: Thu, 02 Jun 2016 17:53:00 -0000 Message-ID: Subject: Re: Windows shortcut "bash -c" the only way? Naturally it ignores profile and hence locale To: cygwin@cygwin.com Content-Type: text/plain; charset=UTF-8 X-SW-Source: 2016-06/txt/msg00027.txt.bz2 I think I found out! I believe I misread the bash docs to say that even "-l" didn't source the startup-files when it does! Apologize. Best Regards/Venlig Hilsen Christoffer Aasted On 2 June 2016 at 19:41, Andrey Repin wrote: > 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