~/.profile not being sourced upon login
#1
Bug 
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
#2
@"Feakster", try this file instead;
Code:
.bash_profile
--
Arwen Evenstar
Princess of Rivendale
#3
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/shel...ripts.html
#4
(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/shel...ripts.html

Hi,

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

Ben


Possibly Related Threads…
Thread Author Replies Views Last Post
  Kali Linux for Pinebook Pro - stuck on the login screen owaspfap 0 608 07-13-2023, 05:21 PM
Last Post: owaspfap
  Chromium Not allowing google login sititahwsi22 1 2,712 11-07-2020, 03:35 PM
Last Post: regivanx
  can't login on pine pro 64 LRFritz 0 1,526 09-25-2020, 02:13 PM
Last Post: LRFritz
  Manjaro ARM Sway Profile appelgriebsch 20 20,071 08-03-2020, 10:28 AM
Last Post: appelgriebsch
  Manjaro bootup freezes on logo before Login LMalilil 26 30,974 07-23-2020, 07:58 PM
Last Post: vdicarlo

Forum Jump:


Users browsing this thread: 1 Guest(s)