On Fri, Jun 09, 2023 at 06:20:07AM -0400, gene heskett wrote:
> On 6/9/23 00:46, tomas@tuxteam.de wrote:
> > On Thu, Jun 08, 2023 at 09:08:59PM -0400, gene heskett wrote:
> >
> > [...]
> >
> > > Perhaps I've ben mistaken, but the files in /etc/udev/rules.d are not the
> > > same as /lib/udev/rules.d, so which one actually rules?
> >
> > The one in /etc, as David said. Unless it doesn't exist.
> >
> > This is actually the classical pattern of "layered configuration", which
> > is widespread in the UNIX world. You see that often with a system config
> > which can be overridden by a user config.
> >
> > Sometimes you have even three layers: distro (e.g. lib), local (etc) and
> > user.
> >
> > Cheers
>
> Thanks for the clarification Tomas. That would intimate the search order
> would be /home/$usr/someplace, /etc/someplace, /lib/someplace. Is that
> correct?
>
> Change of subject:
>
> I have a mod I make to the $PATH which I've put in .profile, but I've failed
> to find a place to make it autoexec when I login. And I'm tired of typing ".
> .profile in every shell tab I open.
I quote in full from the bash man page, section "INVOCATION" (I assume your
shell is bash):
INVOCATION
A login shell is one whose first character of argument zero is a -, or
one started with the --login option.
An interactive shell is one started without non-option arguments (unless
-s is specified) and without the -c option whose standard input and error
are both connected to terminals (as determined by isatty(3)), or one
started with the -i option. PS1 is set and $- includes i if bash is in‐
teractive, allowing a shell script or a startup file to test this state.
The following paragraphs describe how bash executes its startup files.
If any of the files exist but cannot be read, bash reports an error.
Tildes are expanded in filenames as described below under Tilde Expansion
in the EXPANSION section.
When bash is invoked as an interactive login shell, or as a non-interac‐
tive shell with the --login option, it first reads and executes commands
from the file /etc/profile, if that file exists. After reading that
file, it looks for ~/.bash_profile, ~/.bash_login, and ~/.profile, in
that order, and reads and executes commands from the first one that ex‐
ists and is readable. The --noprofile option may be used when the shell
is started to inhibit this behavior.
> Suggestion?
Perhaps you have a ~/.bash_profile, which then would take precedence over
your ~/.profile (people who want to have both usually source ~/.profile
from ~/.bash_profile. Writing shell-independent code is left as an exercise
to the reader, though). Perhaps your PATH is not exported. Perhaps your
.profile isn't in your HOME. Perhaps your shell ain't a login shell (it's
possibly started by the DE monstrosity du jour). I'd start debugging it
by putting some "echo hi >> /tmp/debug-shell-startup" or something, and
putting it also into ~/.bashrc.
> Thanks Tomas. Take care & stay well.
Likewise :)
Cheers
--
t
Attachment:
signature.asc
Description: PGP signature