bug-bash
[Top][All Lists]
Advanced

[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: Sun, 10 Dec 2017 14:19:59 -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:41 PM, Yuri wrote:
> On 12/09/17 15:24, Chet Ramey wrote:
>> 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.
> 
> 
> Ok, but that's not what my situation is. I am just logging in, using the
> display manager, when user has /usr/local/bin/bash as the shell in passwd.

Of course it's what your situation is. You're logging in, and you want
some shell in the sequence (you haven't said exactly which one) to be
started as a login shell and run the login shell startup files.

So if you think about it logically, here's how the startup sequence
probably goes: display manager authenticates the user, starts the user's
window manager, window manager starts up whatever apps its startup
config files specify, one of which is probably a terminal window.  It's
that shell (the one running in the terminal emulator) that determines
whether it's a login shell -- based on the criteria listed in the man
page -- and sources the appropriate startup files.

> Why doesn't it execute ~/.profile?

That's what you have to figure out.  You have to determine why the shell
that is started by the terminal emulator is not started as a login shell,
if that's what you want to have happen.

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    address@hidden    http://tiswww.cwru.edu/~chet/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]