Solaris Common Desktop Environment: Advanced User's and System Administrator's Guide

To Set Environment Variables

    To set system-wide environment variables, create a file in the /etc/dt/config/Xsession.d directory that sets and exports the variable.

For example, if you create an executable ksh script, /etc/dt/config/Xsession.d/myvars, containing:

	export MYVARIABLE="value"

then the variable MYVARIABLE will be set in each user's environment at the next login.

    To set personal environment variables, set the variable in HomeDirectory/.dtprofile.

For example:

	export MYVARIABLE="value"

sets the variable MYVARIABLE in each user's environment at the next login.


Note –

Session Manager does not automatically read the .profile or .login file. However, it can be configured to use these files; see Optionally Sourcing the .profile or .login Script.