Editing the /etc/profile.d/ipm_environment.sh file
This example shows how to set the PDPRINTER environment variable in the /etc/profile.d/ipm_environment.sh file using a Linux editor:
- Enter this command to change to the /etc/profile.d/ directory:
cd /etc/profile.d/
- Enter this command:
vi ipm_environment.sh
A typical /etc/profile.d/ipm_environment.sh file contains lines similar to this:
# /etc/profile.d/ipm_environment #only set PATH if it does not exist(add pd) if ! echo ${PATH} | /bin/grep -q /usr/lpp/pd/bin ; then export PATH=/usr/lpp/pd/bin:${PATH} fi #only set PATH if it does not exist(add psf) if ! echo ${PATH} | /bin/grep -q /usr/lpp/psf/bin ; then export PATH=/usr/lpp/psf/bin:${PATH} fi if ! echo ${PDBASE} | /bin/grep -q /var/pd ; then export PDBASE=/var/pd fi if ! echo ${NLSPATH} | /bin/grep -q /usr/lib/locale/%L/LC_MESSAGES/%N ; then export NLSPATH=/usr/lib/locale/%L/LC_MESSAGES/%N:$NLSPATH fi
- Insert or modify this line in the /etc/profile.d/ipm_environment.sh file:
export PDPRINTER=LogicalDestinationName
where LogicalDestinationName is the name of the logical printer you want to set as the default logical printer for all users. - Save the change in plain text format and exit from the editor.
- Make the change effective by entering the command:
. ./ipm_environment.sh
- Verify the change by entering the command:
echo $PDPRINTER
The logical destination name you entered displays.