Subject: permanently add dir to $PATH

From: Tony Baldwin <[email-masked]>
Date: Fri, 16 Sep 2016 10:01:39 -0400

as mentioned, I'm working with a new Jessie installation and having a 
coupl headaches, the first had to do with getting a kernel module to 
load on boot (already wrote to the list about it.)

The other problem is trying to permanently add $HOME/bin to the $PATH.

I have in .bash_profile
PATH=$PATH:$HOME/bin
export PATH

But every time I boot I have to manually add it again.

Any and all assistance appreciated in advance.

Thanks.
LLAP
Tony

-- 
http://tonybaldwin.me
all tony, all the time

---

From: "der.hans" <[email-masked]>
Date: Fri, 16 Sep 2016 14:27:17 +0000 (UTC)

Am 16. Sep, 2016 schwätzte Tony Baldwin so:

moin moin Tony,

> as mentioned, I'm working with a new Jessie installation and having a coupl 
> headaches, the first had to do with getting a kernel module to load on boot 
> (already wrote to the list about it.)
>

You have to add it to the file again?

/etc/skel/.profile includes $HOME/bin

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

But, the top of the file lets us know it's not used if ~/.bash_profile
exists.

The bash manpage lists the purpose of ~/.bash_profile and ~/.bashrc.

        ~/.bash_profile
               The personal initialization file, executed for login shells
        ~/.bashrc
               The individual per-interactive-shell startup file

~/.bashrc gets read for all shells, including screen and tmux instances
and GUI logins that don't invoke login shells, so I put my changes
in ~/.bashrc rather than ~/.bash_profile. If I had interactive
configurations, then I would put those in ~/.bash_profile, everything else
goes in ~/.bashrc.

Actually, I put them in ~/.bashrc_local and include that from ~/.bashrc
so it's easier to keep my localizations synced across systems.

if [ -f ~/.bashrc_local ]; then
         . ~/.bashrc_local
fi

ciao,

der.hans
-- 
#  http://www.LuftHans.com/        http://www.PhxLinux.org/
#  "The world is a dangerous place to live, not because of the people who
#  are evil, but because of the people who don't do anything about it."
#    --Albert Einstein

---

From: Greg Wooledge <[email-masked]>
Date: Fri, 16 Sep 2016 10:07:56 -0400

> But every time I boot I have to manually add it again.

This is probably because you are logging in with a display manager
instead of ssh or a Linux console.  The display managers do not launch
a login shell, so your login shell configuration files are never read.

(This is why I never use a display manager.  Well, one of the reasons.)

You need to identify which display manager you're using, and then try
to figure out how to configure it as a user.  Good luck.  I've found
that most of them have absolutely ZERO documentation about this.

---

From: Liam O'Toole <[email-masked]>
Date: Fri, 16 Sep 2016 18:45:59 +0100

> that most of them have absolutely ZERO documentation about this.

gdm sources the login scripts, whereas lightdm does not. In the latter
case, do the necessary PATH munging in ~/.xsessionrc.

-- 

Liam