The officially official Devuan Forum!

You are not logged in.

#1 2020-11-04 11:30:50

devian
Member
Registered: 2019-11-08
Posts: 13  

Bash does not parse config files like bash_profile correctly.

According to https://www.gnu.org/savannah-checkouts/ … rtup-Files

"When Bash is invoked as an interactive login shell, or as a non-interactive shell with the --login option, it first reads and executes commands from the file /etc/profile, if that file exists. After reading that file, it looks for ~/.bash_profile, ~/.bash_login, and ~/.profile, in that order, and reads and executes commands from the first one that exists and is readable."

I have no .bash_profile or .bash_login. I only have ,profile (and also .bashrc which *does* get parsed for different reasons) however I am finding that bash does not source this file when started.

Perhaps I should file this somewhere as a bug?
Cheers

Last edited by devian (2020-11-04 11:31:25)

Offline

#2 2020-11-04 17:14:19

Head_on_a_Stick
Member
From: London
Registered: 2019-03-24
Posts: 1,143  
Website

Re: Bash does not parse config files like bash_profile correctly.

Bash will read ~/.profile as long as ~/.bash_profile is not present but only if it is run as a login shell. However SLiM (the default display manager for Devuan) does not run bash as a login shell and logging in through that will result in ~/.profile (or ~/.bash_profile) not being read.

You can confirm this for yourself by logging in at a console (TTY) screen instead. It is not a bug.


Black Lives Matter

Offline

#3 2020-11-04 17:21:47

devian
Member
Registered: 2019-11-08
Posts: 13  

Re: Bash does not parse config files like bash_profile correctly.

I stand corrected. Thanks for the reply. :-)

Offline

Board footer