Web lists-archives.com

Re: Setting default $PATH for all users




On Sun, Feb 10, 2019 at 07:28:02PM -0500, Lee wrote:
> Which is semi-interesting I guess, but you're the one that wanted a
> single location to add $PATH elements for all current & future users -
> yes?  The interesting answer would be if adding
> export PATH=$PATH:/foo
> to /etc/bash.bashrc is what you're looking for.

This only adds the PATH component to interactive bash shells.  It does
not, for example, add it to window managers, desktop environments, web
browsers launched from window manager menus, etc.  Nor does it affect
users of other shells than bash.

<https://mywiki.wooledge.org/DotFiles> gives a decent overview of
how some logins work, including a tiny bit of Debian-specific stuff.
It's missing some pieces (e.g. Debian's ~/.xsessionrc, Arch Linux's
~/.xprofile, warnings about GNOME/dbus), but it's a good start.

See <https://wiki.debian.org/Xsession> for a bit more info on the
Debian-specific stuff, including the ~/.xsessionrc file.

<https://wiki.debian.org/DotFiles> is based on an older version of that
page and may also be helpful.  I wrote the original page on tarzeau's
forerunner of the Debian wiki, and he migrated it to the current wiki
in 2007.  Looks like there have been just a few edits since then, so
the bulk of the page is still my original writing from 15 years ago.
Comparing to the current version on wooledge.org will show you how my
writing has improved since then.  It's still a lifelong learning process.