On Mon, Sep 25, 2023 at 09:40:27AM -0500, Tom Browder wrote: > On Mon, Sep 25, 2023 at 08:50 Tom Browder <tom.brow...@gmail.com> wrote: > ... > > > I think I need to have the program change all the path-affecting files > > specified by Greg and others so that PATH includes both locations with the > > new location coming before the original location. > > > ... > > And that all got me looking at 'adduser' and '/etc/skel' where I do not see > an '.xsessionrc' file. Does it cause harm if one logs into a remote host > regardless of its lack or presence of various graphics features?
/etc/skel contains a *very* minimal set of dot files. It doesn't include any for customizing X sessions. Presumably most users just use their desktop environment control panels, and never actually manage to change environment variables like PATH. The .xsessionrc file (as opposed to .xsession) is a Debian invention, and is sourced at the start of any Debian X session, whether it's started by startx, or a display manager. It's a great place to set variables that need to be set for the duration of an X session. Of course, it does nothing for console/ssh sessions. I offer these caveats for dealing with .xsessionrc: 1) It's Debian-specific, so it does not help if your HOME directory is shared by FreeBSD, Arch Linux, etc. 2) It may or may not do anything with Wayland. I simply don't know. 3) Its settings may be overridden by a desktop environment or WM. 4) Some desktop environments (GNOME being one) launch their terminals via a convoluted mechanism which does NOT inherit its environment from the X session. So, in these setups, variables set in .xsessionrc might work in GUI apps, but not in terminals.