PINE64
~/.profile not being sourced upon login - Printable Version

+- PINE64 (https://forum.pine64.org)
+-- Forum: Pinebook Pro (https://forum.pine64.org/forumdisplay.php?fid=111)
+--- Forum: Linux on Pinebook Pro (https://forum.pine64.org/forumdisplay.php?fid=114)
+--- Thread: ~/.profile not being sourced upon login (/showthread.php?tid=8262)



~/.profile not being sourced upon login - User 11436 - 11-09-2019

Has anyone else had issues relating to ~/.profile not being sourced upon login.

I've made a couple of customisations that add a couple of directories to the system $PATH upon login. However, these don't seem to materialise when I login. Namely:

Code:
# set PATH so it includes the snap bin if it exists
if [ -d "/snap/bin" ]; then
PATH="$PATH:/snap/bin"
fi

# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/.local/bin" ] ; then
   PATH="$HOME/.local/bin:$PATH"
fi


Both directories appear in the system $PATH if I run:


Code:
source ~/.profile

Ben


RE: ~/.profile not being sourced upon login - Arwen - 11-09-2019

@"Feakster", try this file instead;
Code:
.bash_profile



RE: ~/.profile not being sourced upon login - Arglebargle - 11-09-2019

I've always referenced this flowchart to follow bash's initialization insanity:
https://i.stack.imgur.com/17NoJ.png

Pick your login type and follow the colored arrow to see which files bash loads under different circumstances.

See here for more: https://blog.flowblok.id.au/2013-02/shell-startup-scripts.html


RE: ~/.profile not being sourced upon login - User 11436 - 11-10-2019

(11-09-2019, 02:10 PM)Arwen Wrote: @"Feakster", try this file instead;
Code:
.bash_profile

Hi,

I thought it was the case that .bash_profile was sourced if it existed, otherwise .profile was sourced?

Just tried this and rebooted. The contents of the .bash_profile file were also not being sourced.

Ben

(11-09-2019, 09:40 PM)Arglebargle Wrote: I've always referenced this flowchart to follow bash's initialization insanity:
https://i.stack.imgur.com/17NoJ.png

Pick your login type and follow the colored arrow to see which files bash loads under different circumstances.

See here for more: https://blog.flowblok.id.au/2013-02/shell-startup-scripts.html

Hi,

Thank you. I put the code in .bashrc & it works now.

Ben