| Deutsch English Français Italiano |
|
<87bjw24k3e.fsf@doppelsaurus.mobileactivedefense.com> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!news.mixmin.net!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Rainer Weikusat <rweikusat@talktalk.net> Newsgroups: comp.unix.programmer Subject: Re: Default PATH setting - reduce to something more sensible? Date: Sun, 19 Jan 2025 20:36:21 +0000 Lines: 65 Message-ID: <87bjw24k3e.fsf@doppelsaurus.mobileactivedefense.com> References: <vm5dei$2c7to$1@dont-email.me> <87ikqh5n9u.fsf@doppelsaurus.mobileactivedefense.com> <53xhP.976$GtJ8.93@fx48.iad> <87ed155hdu.fsf@doppelsaurus.mobileactivedefense.com> <poBhP.1243903$bYV2.919023@fx17.iad> <877c6wf5o2.fsf@doppelsaurus.mobileactivedefense.com> <rRQhP.65293$XfF8.23235@fx04.iad> <8734hjga0n.fsf@doppelsaurus.mobileactivedefense.com> <vm9err$35gfs$1@dont-email.me> <87v7ufkmdq.fsf@doppelsaurus.mobileactivedefense.com> <vmitkt$282bg$1@dont-email.me> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: individual.net oyePTN04YOm/Z1fYhf91SQPVSfjJZpU/nx3+eMHSO9q0mMmyI= Cancel-Lock: sha1:M/YwNUJmQcYVdE69QG3cWJmt72I= sha1:DZwFiAZnUeV5yoKW29MWg3w5h/A= sha256:SLYKm9M2IYZF0VgPBvxXlbyoNv99b+BXdAD0S76+DQ8= User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) Bytes: 4440 Janis Papanagnou <janis_papanagnou+ng@hotmail.com> writes: > On 16.01.2025 12:51, Rainer Weikusat wrote: >> Janis Papanagnou <janis_papanagnou+ng@hotmail.com> writes: >>> >>> 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?" >> >> Because someone thinks that all these locations should be searched for >> commands in the order specified. Eg, the point of the lightdm entry is >> very likely to enable lightdm to 'override' arbitrary user commands by >> making sure that the shell will find lightdm-commands of the same name >> first. > > That's a thought that I had as well. But upon reconsideration I thought > that it wouldn't be necessary to _export_ that path component into the > user environment. How else is it supposed to affect/ benefit users¹? ¹ According to the changelog of the Debian lightdm package, a 'gdm flexiserver' script used to to be included with lightdm until 2014 and the PATH addition was needed by that. Now, 2014 is 11 years ago. Maybe, a software update could help? [...] >>> "_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." >> >> As already written above: They are part of PATH because someone thinks >> that's sensible. Whether or not they're necessary in a certain situation >> is an entirely different question. If you want to work out empirically >> what's "necessary" for you, remove them all and add directories to the >> default PATH one-by-one as the need arises. > > Well, I have a clear idea what I need and what is necessary. Since I > cannot remove that 'lightdm' thing I may just define the PATH anew in > my (shell-)environment. You absolutely can removed the lightdm path entry. That's going to be set during session or shell initialization, ie, either from some file used by pam_nev (=> pam_env(7)) or in a shell initialization script (for bournlike-shells, /etc/profile and /etc/profile.d). >> OTOH, what's the point? My flat contains more light switches than I >> actually need, with some of them being (as far as I could determine) >> entirely blind/ connected to lamps I don't use and some of them being >> redundant because they switch lamps on or off which can also be switched >> on or off with another light switch. But as they're just sitting on the >> wall and removing them would require work, I haven't even considered >> doing so. > > That are different things. The switches are put in advance at places > that are reasonable. And you wouldn't put a switch below the WC, I'm > sure (read: "WC" ~ 'lightdm'). I have a switch next to my garden door which does nothing. I think that's most unreasonable because I sometimes press it because of mistakenly believing it should turn the bedroom lamp on. I then usually remember this when the lamp fails to turn on (or off).