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

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



On Wed 07 Apr 2021 at 11:33:02 (-0400), Greg Wooledge wrote:
> On Wed, Apr 07, 2021 at 03:16:41PM +0000, Lee wrote:
> > 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.

Where I want output, I protect it with:

    [ -n "$PS1" ] && printf …

> > 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.

As so often, we're reduced to guessing, because we're not shown
the *actual* text of the problem, but just some paraphrase.

Cheers,
David.


Reply to: