Web lists-archives.com

Re: Setting default $PATH for all users

On Sun 10 Feb 2019 at 14:57:22 (-0600), Richard Owlett wrote:
> On 02/08/2019 12:55 PM, David Wright wrote:
> > On Fri 08 Feb 2019 at 07:18:39 (-0600), Richard Owlett wrote:
> > > I'm running Debian Stretch with MATE desktop.
> > > I want the current user and all future users to include all
> > > directories in root's $PATH.
> > 
> > If you're talking about PATH, then you're talking about logging in.
> > So of equal importance to the DE you're using is the DM, and I'll
> > guess that's likely lightdm. Was that amongst your search terms? >
> > > I haven't found a definitive answer in my web search. The answers
> > > seem to depend on which Linux is used and multiple parameters.
> > 
> > Yes, as are so many other details of configuration.
> > 
> > If searching outwards gets you no further, then perhaps turn your
> > attention inwards. For example,   grep -r PATH /etc   or, a little
> > less noisy,   grep -r PATH= /etc   will reveal some candidates
> > (plus lots of false positives, which the filenames will make obvious).
> I used "grep -r /usr/local/games /etc" which yielded "/etc/login.defs"
> and "/etc/profile".

You've lost me. I don't see much similarity between:

    grep -r PATH= /etc


    grep -r /usr/local/games /etc

> Editing those two files had no effect.

There's little point in posting a sentence like that. You don't show
what edits you did, nor what tests you performed.

> I did a new search including "lightdm" as one term.

I assume that's confirmation that you do use a DM.
In which case many people here may have difficulty helping you
directly as they're going to be like me: not using one.

So I can only make suggestions as to where to look. I don't know
what you'll find where, and whether it'll help. I've read that
DMs and DEs can be difficult to bend to your will.

> I got multiple hits - [none seemed authoritative].

I've no idea what that means. There are plenty of lightdm docs/wikis
out there. Do you expect some sort of .gov website?

> I did get one hit which hints I may not get what I want.

Do you mean that someone posted that they gave up trying? …

> A thread discussing a quite different situation says in part:
> > The basic problem is that lightdm in Debian hard-codes the path
> > https://launchpadlibrarian.net/94971962/01_set-default-path.patch
> 	[https://lists.debian.org/debian-user/2014/04/msg00006.html]
> Although the link is to a Ubuntu bug report, not Debian, the code
> shown is consistent with my observations.

… or is that your one hit?

> Unless someone can point to a single location to modify that:
>   1. modify existing user(s)
>   2. have effect for ALL future users
>   3. survive updating to future releases
> I'll drop the issue.

I don't think there is just one location to set an environment
variable for every access method and in every circumstance.
So it might help to know what you really want to do. After all,
every PATH= line has a specific purpose. What's yours?