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

Re: .profile not being src'd at login on uptodate buster



On 4/7/21, Gene Heskett <gheskett@shentel.net> wrote:
> Greetings all;
>
> I just installed buster on a Dell 7010 and I have added two stanza's to
> my .profile, to find a logout and back in does not establish a new
> $PATH.

Probably because you've got a window manager that does the login stuph for you..

> The first of them will be added but not the other if I
> . .profile
>
> The additions to .profile are:
> =====
> # set PATH so it includes user's private bin if it exists
> if [ -d "$HOME/bin" ] ; then
>     PATH="$HOME/bin:$PATH"
> fi
>
> # set PATH so it includes user's private AppImages if it exists
> if [ -d "$HOME/AppImages" ] ; then
>     PATH="$HOME/AppImages:$PATH"
> fi
> =====
> Both directories do exist.
>
> Any idea why its not working?

A typo in your script?  Add an else clause that shows the error and
that will probably show you what's wrong -- eg

dir="$HOME/AppImages"
if [ -d "$dir" ] ; then
  PATH="$dir:$PATH"
else
  echo "OnNoes!! The directory \"$dir\" does not exist!"
fi

note that $HOME/AppImages is listed only once.  That makes sure that
your test, path and diagnostic output are all using the same directory
name.

Regards,
Lee


Reply to: