SparkyLinux Forums

Software & hardware support => Newbie questions => Topic started by: nbxmike on July 22, 2015, 06:32:19 PM

Title: No $HOME/.bash_profile script?
Post by: nbxmike on July 22, 2015, 06:32:19 PM
I am new to Sparky and LXDE; but, in other Linux distros I am used to a bash start script typically adding $HOME/bin to the path, if $HOME/bin exists.  I like this behavior, should I just create my own $HOME/.bash_profile script or is there a different mechanism in Sparky that I should use?

Thanks
Title: Re: No $HOME/.bash_profile script?
Post by: pavroo on July 22, 2015, 08:34:55 PM
If you would like to run your scripts at startup, use ~HOME/.config/autostart/your.desktop file.
Title: Re: No $HOME/.bash_profile script?
Post by: nbxmike on July 24, 2015, 05:18:10 PM
I just added

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

to the .bashrc script, to get the behavior I want. 

Apparently Gnome will carry through the setting of your initial login in all subsequent bash sessions while LXDE does not (or maybe some other component that is different from Mint Debian Edition and Sparky, there are probably only a few billion differences, I do not claim I understand).  At any rate .bashrc is what is supposed to, and does, execute for non-login shell and when I insert the above into it I get the behavior I expect.