More and more packages are adding files to /etc/profile.d/ but nothing
is sourcing them by default in debian.
$ apt-file search /etc/profile.d/|wc -l
Other distributions (RH-like) are sourcing files put in that directory
for years now (but not /etc/profile itself)
# Only display echos from profile.d scripts if we are no login shell
# and interactive - otherwise just process them to set envvars
for i in /etc/profile.d/*.sh; do
if [ -r "$i" ]; then
if [ "$PS1" ]; then
. "$i" >/dev/null
Wouldn't it make sense to follow what RH and already some packages in
the archive are doing and source .sh files from /etc/profile.d/ in
non-login shell as well?