Previous Table of Contents Next

The LANG and LC environment variables specify the locale-specific conversions and conventions for the shell, such as time zones, collation order, format of dates, time, currency, and numbers. In addition, you can use the stty command in a user initialization file to set whether the system supports multibyte characters.

LANG sets all possible conversions and conventions for the given locale. If you have special needs, you can set various aspects of localization separately by using the following LC variables:


Table 1-9 lists the values for the LANG and LC environment variables.

Table 1-9 Values for LANG and LC Variables

Value Locale
DE German
FR French
ISO_8859_1 English and European
IT Italian
SV Swedish
TCHINESE Taiwanese

Other environment variables include:

  CALENDAR: Sets the path to the Calendar executables.
  CDPATH (or cdpath in the C shell): Sets a variable used by the cd command. If the target directory of the cd command is specified as a relative path name, the cd command first looks for the target directory in the current directory (.). If the target is not found, the path names listed in the CDPATH variable are searched consecutively until the target directory is found and the directory change is completed.
  DESKSET: Sets the path to the DeskSet executables.
  history: Sets history for the C shell.
  HZ: Sets history for Bourne and Korn shells.
  LPDEST: Sets the user's default printer.
  MAIL: Tells the shell where to look for new mail.
  MANPATH: Sets the hierarchies of man pages available.
  MANSECTS: Sets the available sections of manual pages.
  OPENWINHOME: Sets the path to the OpenWindows executables.
  prompt: Defines the shell prompt for the C shell.
  SHELL: Sets the default shell used by make, vi, and other tools.
  TERM (or term in the C shell): Defines the terminal. This variable should be reset in /etc/profile or /etc/.login. When the user invokes an editor, the system looks for a file with the same name as the definition of this environment variable. The system searches the directory referenced by TERMINFO to determine the terminal characteristics.
  TERMINFO: Specifies the path name for an unsupported terminal that has been added to the terminfo file. Use the TERMINFO variable in /etc/profile or /etc/.login.
  TZ: Sets time zone.

Users and system administrators can define additional variables for their own use. When you define an environment variable from a shell command, the variable remains in effect while you remain in the shell. When you exit the shell, the environment variable is not retained. Store "permanent" environment variables that are likely to be used during each login session in the .profile, .login, or .cshrc file. The syntax for defining environment variables depends on the shell.

Common Desktop Environment Environment Variables

The Common Desktop Environment (CDE) has its own set of environment variables. Desktop search paths are created at login by the desktop utility dtsearchpath. The dtsearchpath utility uses a combination of environment variables and built-in locations to create the search paths.

The environment variables that dtsearchpath reads are called input variables. These are variables set by the system administrator or end user. The input variables use the naming convention DTSP*.

When dtsearchpath runs at login, it assembles the values assigned to these variables, adds built-in locations, and creates values for output variables. Each search path has an output variable, as shown in Table 1-10

Table 1-10 CDE Search Path Environment Variables

Search Path Output Environment Variable Systemwide Input Variable Personal Input Variable

CDE components use the values of the output variables. For example, Application Manager uses the value of the application search path (DTAPPSEARCHPATH) to locate application groups. For more information about CDE, refer to Solaris Common Desktop Environment: Advanced User's and System Administrator's Guide.

Previous Table of Contents Next