1) I'd opt for personal files, like pwd_hu suggested: .bashrc/.bash_profile
2) Take a look at man's man page: man man
You'll probably have to play with -C and/or -M options.
3) They contain scripts to set enviroment values which are needed by programs which are not neccesary to normally run a system. That means, no critical packages, like QT,gtk,jre. To avoid having to thinker a lot to set these values, packages often includes this scripts which goes there, so they can easily be added or removed by just playing with a file inside profile.d.
These scripts are called at the end of /etc/profile's execution.
The "official" slackware package contains a script in profile.d which set some of these enviroment values you need, this is the bash script:
Code:
#!/bin/sh
# Environment variables for the Qt package.
#
# It's best to use the generic directory to avoid
# compiling in a version-containing path:
if [ -d /usr/lib/qt ]; then
QTDIR=/usr/lib/qt
else
# Find the newest Qt directory and set $QTDIR to that:
for qtd in /usr/lib/qt-* ; do
if [ -d $qtd ]; then
QTDIR=$qtd
fi
done
fi
if [ ! "$CPLUS_INCLUDE_PATH" = "" ]; then
CPLUS_INCLUDE_PATH=$QTDIR/include:$CPLUS_INCLUDE_PATH
else
CPLUS_INCLUDE_PATH=$QTDIR/include
fi
MANPATH="$MANPATH:$QTDIR/doc/man"
PATH="$PATH:$QTDIR/bin"
export QTDIR
export CPLUS_INCLUDE_PATH
export MANPATH