X-Recipient: archive-cygwin AT delorie DOT com X-Original-To: cygwin AT cygwin DOT com Delivered-To: cygwin AT cygwin DOT com DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org BB754385780E Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=towo.net Authentication-Results: sourceware.org; spf=none smtp.mailfrom=towo AT towo DOT net Subject: Re: Noticed that mintty starts non-login bash with "Win+R mintty Enter". To: cygwin AT cygwin DOT com References: From: Thomas Wolff Message-ID: <744d526c-651f-a1d9-72af-f150478e732c@towo.net> Date: Tue, 5 Jan 2021 11:31:54 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 MIME-Version: 1.0 In-Reply-To: X-Provags-ID: V03:K1:PpVih7dPXKzHoRdNlEhpnxdfudvpsb7UyV9X49+oJMsLde8Vl2i Bz8Wc7kGw7s/oxFmrAPdlXwLWmg7lFE7Bi16jmC54HXtrRAfmGYQrYsqSAIKAFDlz2h472p E9a9zTUE3DfvhJGbNp+Pf2khL3krQbZ+mEM5flahqpAcopfP5opZ7Q8wVSa11byuSYOCwvB k0I/qOfuY4k1U+a41wHMw== X-UI-Out-Filterresults: notjunk:1;V03:K0:qTZUfbPztq4=:bak0uA7MsrL4KI/RyD5KUw Ts0XwBbDQssLnzAtyuOVc3OoFqc9bfYsnTXI4dYfBSZZKjmfvUzqXoCjbM5HVxvsr0NiBzroV IMP/+wyi0jqG1jnqpMmTEKznVcERbkuipzAvAeBQDGXSFiKJv15sm7eGNSEbCMIDv83dsZcao jqq+4UUOvnMAj1u3uBtQ8M4EGLyyXOz5JzQFMQRDYHxVjqGBNWlTePjkRLw4lNWt45tVItKMW KsIcWhbTWSpb5J4ZcyGsKeRkVd3dYGOEvfmvFFcIVgmE1FLqghxb+fEPyW1Reqzl5ZXYq7C57 uketMIPktEWs9RCb7UV6wRhqezKC+HI/Eqp4LVd6KwCKnVgAscdYhERmuwElv0PJcAntT3QPo MXNc9QiWhI1NgXXH/l8xCVt0wGG7yIn8Leo7Sfjh3wClG57ftdzlTTTGu2BOb X-Spam-Status: No, score=1.7 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, KAM_LAZY_DOMAIN_SECURITY, NICE_REPLY_A, RCVD_IN_BARRACUDACENTRAL, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=no autolearn_force=no version=3.4.2 X-Spam-Level: * X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: cygwin AT cygwin DOT com X-Mailman-Version: 2.1.29 Precedence: list List-Id: General Cygwin discussions and problem reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: cygwin-bounces AT cygwin DOT com Sender: "Cygwin" Am 04.01.2021 um 23:33 schrieb Oleksandr Gavenko via Cygwin: > I interact with Cygwin via mintty launched as "Win+R mintty Enter". > > ... > After looking into docs I got that mintty should be launched with a parameter "-". > > Probably it was always that way. Yes, but it might be appropriate to apply special handling for this case and imply login mode if started via Win+R. What do others think? > ================ > > Checking POSIX standard on what might be defined in login shell: > > https://pubs.opengroup.org/onlinepubs/7908799/xbd/envvar.html (1997) > https://pubs.opengroup.org/onlinepubs/009696899/basedefs/xbd_chap08.html (2004) > > I noticed that USER is mentioned but LOGNAME is not only mentioned by > description is given: > > The system shall initialize this variable at the time of login to be the > user's login name. > > Cygwin's /etc/profile has: > > # Set the user id > USER="$(/usr/bin/id -un)" > > but there is nothing for LOGNAME... Shouldn't /etc/profile set LOGNAME too? Looks reasonable. -- Problem reports: https://cygwin.com/problems.html FAQ: https://cygwin.com/faq/ Documentation: https://cygwin.com/docs.html Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple