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:mime-version:in-reply-to:references:from:date :message-id:subject:to:content-type; q=dns; s=default; b=ZxDFACb yw/1RJ224pIgF8jJCExRtL9zS2uinEctrAVHFG7qvMxUL3EzCLjKuWGZAakCR+ZB 3vz+LuDPvtf8Wy9ROeu71+EjkH5SZaDbjRArGHG605F+7m2csXP+fsS4VBktz6o0 o+j4swhT12CcF70Y9vGAcPB7g+GsWiWDQNeI= 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:mime-version:in-reply-to:references:from:date :message-id:subject:to:content-type; s=default; bh=NwJA3QVQ4M9LB z5/5Adrw3T5gwA=; b=MtroV0myvTeHPA3OaFrEoeY252raCBpcLtGxUafFlL0xu ARQNm/ewrINXMXw+t3I7r/n7Tr4zl/WQJtjjtdQRwXXDTUqllcawmTjKslXIy27k QN9epvQZcMfXSkXGqT5XvUGTKZiHtGxekT3JO5aEEorIIbF60hEdAg7Yp9il2U= 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=-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 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 In-Reply-To: <602832425.20160602204147@yandex.ru> References: <602832425 DOT 20160602204147 AT yandex DOT ru> From: Christoffer Aasted Date: Thu, 2 Jun 2016 19:52:13 +0200 Message-ID: Subject: Re: Windows shortcut "bash -c" the only way? Naturally it ignores profile and hence locale To: cygwin AT cygwin DOT com Content-Type: text/plain; charset=UTF-8 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 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