And you want to make sure NOT to invoke module initialization for root, as this could negatively affect your system's overall performance.
On 1/16/2023 2:35 PM, Sternberg, Michael G. via Modules-interest wrote:
> If module(1) availability differs between GUI and CLI, then module initialization on your system differs by type of shell invocation, meaning non-interactive vs. interactive vs. login vs. remote.
>
> For diagnostics, from a terminal in an X11 session where "module list" currently fails, run:
>
> xterm -ls
>
> If "module list" _does_ work in the resulting new window, then your distro has shells configured to read /etc/profile.d/* for login shells only, which has been the historic default.
>
>
> To rectify, your choices are:
>
> (a) Have your X11 terminal flavor always invoke shells as login shells, not merely interactive shells. Consult the terminal application's preferences or its man page. For xterm specifically, add to your ~/.Xresources file or your distro's equivalent under /etc/ :
>
> XTerm*loginShell: true
>
> One way to actually pick up and test this change is to end and re-start your entire X11 session.
>
>
> (b) Have the module initialization done for shells invoked as _non-login_ shell [and this not be needlessly repeated if it _is_ a login shell.] To this end, search for "etc/" in the shell's man page; for bash(1), see section "INVOCATION".
>
> It is not quite trivial to hook this in correctly for all shell implementations offered, to all local users, in all invocation types, and remain so across system updates/re-installations.
>
>
>
> With best regards,
>
--
--------------------------------------------------------
The views and opinions expressed above are strictly
those of the author(s). The content of this message has
not been reviewed nor approved by any entity whatsoever.
--------------------------------------------------------
Paul FM Info: http://paulfm.com/~paulfm/
--------------------------------------------------------
|