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

Re: PATH revisited: one PATH to "rule the [Debian] World"



On Sun, Sep 24, 2023 at 07:42:32PM +0000, Michael Kjörling wrote:
> On 24 Sep 2023 13:05 -0400, from dsr@randomstring.org (Dan Ritter):
> > Set it in /etc/profile, which probably has this in it:
> 
> I would rather suggest a separate script in /etc/profile.d to either
> add to or replace the contents of $PATH. If I'm reading /etc/profile
> right, *.sh in that directory are executed in lexicographic order
> right at the end.

All of which is a red herring, because /etc/profile and the things
dotted in from it are only applicable to login mechanisms that involve
a shell.

In the case of an X session consisting of a window manager, executed
directly from a display manager, there is no login shell at any time,
and therefore nothing reads /etc/profile.

One may configure such an X session by editing ~/.xsession or other
files of that nature, and that will indeed configure your environment
as desired -- for X sessions.  But you'll have a different environment
if you login on a text console and don't do "startx", or if you login
by ssh.

There is NO configuration mechanism that works for all logins.  None.
I've been up and down this road for 30 years.  It doesn't exist.  I
would have found it by now.

All you can do is put your desired configuration changes in ALL of
the applicable places for all of the login types that are possible on
your system.  That's it.  There is no other way.


Reply to: