This is the mail archive of the
mailing list for the Cygwin project.
Re: Windows shortcut "bash -c" the only way? Naturally it ignores profile and hence locale
- From: Christoffer Aasted <chr dot aasted at gmail dot com>
- To: cygwin at cygwin dot com
- Date: Thu, 2 Jun 2016 19:52:13 +0200
- Subject: Re: Windows shortcut "bash -c" the only way? Naturally it ignores profile and hence locale
- Authentication-results: sourceware.org; auth=none
- References: <CAM9yT0-Y7nJoHuQ_O=F_miMT8y+qAtKYnJA+ceF7DiX8wLwCvA at mail dot gmail dot com> <602832425 dot 20160602204147 at yandex dot ru>
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!
Best Regards/Venlig Hilsen
On 2 June 2016 at 19:41, Andrey Repin <email@example.com> 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
>> C:\cygwin64\bin\mintty.exe /bin/bash -l -c "set ssh -t firstname.lastname@example.org
>> 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 -
>> 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 email@example.com 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
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple