Deutsch   English   Français   Italiano  
<vmispd$27pfq$1@dont-email.me>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: ...!weretis.net!feeder9.news.weretis.net!news.quux.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail
From: Janis Papanagnou <janis_papanagnou+ng@hotmail.com>
Newsgroups: comp.unix.shell
Subject: Re: Default PATH setting - reduce to something more sensible?
Date: Sun, 19 Jan 2025 13:56:12 +0100
Organization: A noiseless patient Spider
Lines: 60
Message-ID: <vmispd$27pfq$1@dont-email.me>
References: <vm5dei$2c7to$1@dont-email.me> <rRQhP.65293$XfF8.23235@fx04.iad>
 <8734hjga0n.fsf@doppelsaurus.mobileactivedefense.com>
 <vm9err$35gfs$1@dont-email.me> <vm9g7r$ish$1@reader2.panix.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=windows-1252
Content-Transfer-Encoding: 7bit
Injection-Date: Sun, 19 Jan 2025 13:56:13 +0100 (CET)
Injection-Info: dont-email.me; posting-host="e25c2d96020b61c46ab4932d82a1a471";
	logging-data="2352634"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX18HLr+8YEPg2UcGKz+1ans2"
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101
 Thunderbird/45.8.0
Cancel-Lock: sha1:GmCUyJoOhTnzHIh/+azrm+znC6w=
In-Reply-To: <vm9g7r$ish$1@reader2.panix.com>
X-Enigmail-Draft-Status: N1110
Bytes: 3784

On 16.01.2025 00:26, Dan Cross wrote:
> In article <vm9err$35gfs$1@dont-email.me>,
> Janis Papanagnou  <janis_papanagnou+ng@hotmail.com> wrote:
>> [snip]
>> Since you're referring to me, the OP, please note that most arguments
>> here have quickly made a relation to a straw man (a performance theme)
>> or made other deviations from the basic question(s) that concerned me.
>>
>> Essentially there were two questions I had that I can reformulate in a
>> more compact form as
>>
>>  "Why, in the first place, are all these path components
>>   part of the default PATH for ordinary users? - Is there
>>   any [functional] rationale or necessity for that?"
> 
> Not particularly.
> 
> The system has, probably for no really principled reason,
> evolved over time such that that's simply the set of things that
> are in $PATH by default on that particular machine.  Another
> machine might be different.

Yes, that is true and important. That's why it feels bad to change
it; the OS/distribution should provide a sensible definition.

> 
> If I had to hazard a guess, I imagine some of it comes from the
> folks who put together the distribution, some upgrades, and the
> choices of e.g. the window manager you're using (recalling that
> at least one $PATH component appeared to come from that).
> 
>>  "_If_ many of the default PATH components are unnecessary,
>>   where and how to best reduce these settings to a sensible
>>   subset? - Without spoiling the system, of course."
> 
> There are many ways you could do this.  Probably the easiest is
> just to explicitly set $PATH in your shell's startup files to
> those directories you care about; that's what I usually do.  If
> you make a mistake with it, you won't affect the rest of the
> system.

Yes, I agree. That's what I had done in past days (but at home I
got sloppy).

> 
> If you want to set it globally for all users, there's likely
> some file in /etc or similar that sets the defaults; on my Linux
> machine I see a number of things in /etc/profile and
> /etc/profile.d/* that seem relevant and there's /etc/login.defs;

I had inspected all the relevant system files on that and didn't
find anything, but maybe I missed it (I'll search once again).

> PAM has its own way to set up $PATH.  I'm not sure I'd bother,
> though, if setting it up for your own account is sufficient.

Yeah, you're probably right that this is the simplest thing to do.

Janis