On Wed, Apr 07, 2021 at 03:16:41PM +0000, Lee wrote: > On 4/7/21, Gene Heskett <[email protected]> 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..
Display Manager. > > The first of them will be added but not the other if I > > . .profile > > # 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. Prove it, by running ls -ld $HOME/AppImages in a terminal, and then pasting the shell prompt, the command, and its output from the terminal session into the body of the email. For example, unicorn:~$ ls -ld $HOME/AppImages ls: cannot access '/home/greg/AppImages': No such file or directory > > 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 Writing error messages to stdout from a .profile isn't generally the best idea. Writing to stderr would be slightly better, but both of them should be avoided in a permanent configuration if possible. Profiles that scribble to stdout or stderr during login can break things like scp. As a *temporary* debugging measure, it's fine. > 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. That's good advice in general, yeah.

