public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Windows shortcut "bash -c" the only way? Naturally it ignores profile and hence locale
@ 2016-06-02 16:40 Christoffer Aasted
  2016-06-02 17:50 ` Andrey Repin
  0 siblings, 1 reply; 3+ messages in thread
From: Christoffer Aasted @ 2016-06-02 16:40 UTC (permalink / raw)
  To: cygwin

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"

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?


Best Regards/Venlig Hilsen
Christoffer Aasted

--
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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-06-02 17:53 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-02 16:40 Windows shortcut "bash -c" the only way? Naturally it ignores profile and hence locale Christoffer Aasted
2016-06-02 17:50 ` Andrey Repin
2016-06-02 17:53   ` Christoffer Aasted

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).