[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: ~/.profile and ~/.bash_profile aren't executed on login
From: |
Chet Ramey |
Subject: |
Re: ~/.profile and ~/.bash_profile aren't executed on login |
Date: |
Sat, 9 Dec 2017 18:24:16 -0500 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 |
On 12/9/17 6:09 PM, Yuri wrote:
> On 12/09/17 15:01, Chet Ramey wrote:
>> Since it doesn't happen on any other OS, I suspect an issue with either the
>> FreeBSD port or the pathname that appears in argv[0] when the shell is
>> started, which is what bash uses to detect that it's been invoked as a
>> login shell.
>
>
> The full path is /usr/local/bin/bash as set in passwd db. It doesn't run
> ~/.profile when I run it manually using this path.
Of course not: that's not a login shell. As the documentation says,
"A login shell is one whose first character of argument zero is a -, or
one started with the --login option."
The INVOCATION section of the manual page explains it in exhaustive detail.
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU chet@case.edu http://tiswww.cwru.edu/~chet/
Re: ~/.profile and ~/.bash_profile aren't executed on login, Yuri, 2017/12/10
- Re: ~/.profile and ~/.bash_profile aren't executed on login, Chet Ramey, 2017/12/10
- Re: ~/.profile and ~/.bash_profile aren't executed on login, Yuri, 2017/12/10
- Re: ~/.profile and ~/.bash_profile aren't executed on login, Geir Hauge, 2017/12/11
- Re: ~/.profile and ~/.bash_profile aren't executed on login, Chet Ramey, 2017/12/11
- Re: ~/.profile and ~/.bash_profile aren't executed on login, Yuri, 2017/12/11
- Re: ~/.profile and ~/.bash_profile aren't executed on login, Greg Wooledge, 2017/12/11