NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: xsrc/54851 (.profile is not read by sh when using xdm or other login managers)



The following reply was made to PR xsrc/54851; it has been noted by GNATS.

From: Valery Ushakov <uwe%stderr.spb.ru@localhost>
To: gnats-bugs%netbsd.org@localhost
Cc: Robert Elz <kre%munnari.OZ.AU@localhost>
Subject: Re: xsrc/54851 (.profile is not read by sh when using xdm or other
 login managers)
Date: Tue, 23 Aug 2022 21:12:47 +0300

 On Mon, Aug 22, 2022 at 12:50:02 +0000, Robert Elz wrote:
 
 >  If people feel that we should continue to allow shells running scripts
 >  or shells invoked with -c to be considered login shells (either with
 >  the -l or **argv=='-' methods) now would be a good time to say - making
 >  that change (for either or both of those cases) means deleting one
 >  (new) line of code for each (ie: the decision doesn't need to be the
 >  same for both).
 
 ksh, bash and zsh seems to allow mixing login and -c.  I'd prefer we
 follow suit.
 
 E.g. (with my ~/.bash_profile moved out of the way)
 
 $ cat ~/.profile
 export LOGIN_SHELL=42
 $ ksh -l -c 'echo $-; env | grep LOGIN_SHELL'
 clh
 LOGIN_SHELL=42
 $ bash -l -c 'echo $-; env | grep LOGIN_SHELL'
 hBc
 LOGIN_SHELL=42
 
 Don't have zsh handy at the moment, but I checked the above on a mac
 with zsh too.
 
 -uwe
 


Home | Main Index | Thread Index | Old Index