[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: User's bin path not recognised in login script



On 03/21/2016 11:03 AM, Russell Gadd wrote:
The bash login script I have added in to my startup programs does not
recognise /home/user/bin as part of the path, whereas it used to when I
was running Linux Mint (I'm a recent refugee). I've got
PATH="$HOME/bin:$PATH" in ~/.bashrc and also in ~/.profile, together
with a ~/.bash_profile which sources ~/.profile. I've no idea whether
all these are necessary - they do work to search my bin in a script run
in the Mate terminal but not in the login script. It's not a big deal as
I can prepend the absolute path in the login script, although I assume
this means also doing it in sourced scripts within the login script, so
I'd like to know if there's a clean way to set this up.


Did you remember the 'export' in .profile?

    export PATH=$PATH:$HOME/bin


It might help to add echo's in the various scripts to check the order in which they run -- e.g. verify that .bash_profile runs before your bash login script, so that PATH includes $HOME/bin.


David


Reply to: