-->

Previous | Table of Contents | Next

Page 84

With the new Mail subpanel still extended, drag the Information icon to the Install Icon control on the subpanel. The icon is added to the subpanel, and when it is clicked, the Information view of the Application Manager appears on the desktop.

To delete this new icon, click it and select Delete. To delete the new subpanel, click the Mail icon and select Delete Subpanel.

TIP
This is only the beginning of what is available via menus and the right mouse button. Don't be afraid to explore the Front Panel by yourself. If you are worried about making an irreversible change to the desktop, set up a home session (described in "The Style Manager" section) before you experiment. If you make a change that is too much to reverse, log out and log in again. When you have a configuration that you really like, save your home session again.

Advanced Customizations

Beyond the simple menu selections and drag and drop, there are customizations that require editing some configuration files and scripts.

Shell and Login Setup

Experienced users might be confused the first time they use the shell after logging into the CDE. Unless some adjustments have already been made, their .profile or .login scripts are not read. When a user logs into the CDE, the file .dtprofile is read instead.

Rather than force users to modify their environments, the CDE designers added a configuration parameter, DTSOURCEPROFILE, to the .dtprofile. If this variable is set to true, dtlogin will read the appropriate file, depending on the user's shell. The CDE is built upon ksh, so dtlogin expects sh or ksh syntax in .dtprofile. It will, however, accept csh syntax in .login. The default .dtprofile contains notes on how users can set up their environments to work well in and out of the desktop.

Another important setting in .dtprofile is session logging. Output generated by applicationsstarted within the desktop doesn't automatically go to the console as it does in most X Window environments. It is normally discarded. If viewing this output is necessary, direct it to a file (or the console) by setting the dtstart_sessionlogfile variable to a valid filename in .dtprofile. The default .dtprofile has comments explaining how to do this.

Logically, because .dtprofile is read in at login, you can make other adjustments to it to suit your needs, such as setting environment variables needed for applications and also modifying the search path. Because some changes might be necessary only within X Window, this provides a good mechanism for users who want to keep their non-GUI environment lean.

Page 85

If you have no .dtprofile in your home directory ($HOME), the system uses the default version stored in $CDEROOT/config/sys.dtprofile ($CDEROOT is the base directory of the CDE installation, usually /usr/dt) and copies it into the your directory for the next time.

In the event that an administrator wants to make changes to the environment for an entire workstation, regardless of user, the system files listed can be copied into another directory, /etc/dt/config, and modified.

X Resources

Users who want to add personal X resources can simply create an .Xdefaults file in their home directory. For system administrators who want to set resources for entire systems, there is a shared file, sys.resources, you can modify and place in /etc/dt/config/C/.

Advanced Front Panel Customization

The Front Panel is controlled by a series of configuration files that are loaded dynamically each time the desktop is started. This dynamic loading process enables users to change their panel configuration without having root access to the system. Also, administrators can override default behavior and tailor the desktop to their needs without changing the default configuration files and without making things more difficult for advanced users.

The format of the Front Panel configuration files is described in detail in the dtfpfile manual page. (If this manual page is not available on your system, install the TEDman package from the CDE media.) I will cover enough of this file format in order to make some basic changes.

Configuration files are read from the action database search path, which consists of these locations, in this order:

In the last two locations, C is the language directory. Another industry standard is the notion of locales. A locale is a set of display conventions and language files that make it possible to use an application effectively in different parts of the world. For example, one locale might display dates using the format MM/DD/YY, while another uses DD/MM/YY. Locales are part of the ISO standards for computing. Set the locale for the CDE with the LANG environment variable and by installing the proper locale support files. Support is included for Western Europe, Japanese, traditional Chinese, simplified Chinese, and Korean.

The generic C locale is the default and is generally the one used in the United States.

The order of the search path is important because in the event that two files specify the same name for two controls, the description that is read first is the one that is used. This enables a system administrator to override the CDE's behavior by placing control descriptions in the

Page 86

system location and enables users to override the administrator's control by placing their own definitions in their home directory.

TIP
All the changes you perform in this section will occur in the first location, the user's home directory. Any or all of them can be performed in either of the other two locations and will then affect all users on that system—this is how to integrate an application suite such as Applix or the Cygnus development tools into a company or departmentwide system. However, modifying the third directory, /usr/dt, is generally discouraged: An upgrade to a new version of CDE would remove the changes because a newer version of the configuration files would most likely be copied into the system!
For this reason, make any modifications to the default CDE configuration for an entire workstation or organization in the /etc/dt directory tree.

The Front Panel is divided into five different component types—panel, box, control, subpanel, and switch. The panel is the outermost container, the Front Panel itself. For this component, you need to set behavior such as whether a single or double-click activates controls and whether the Front Panel has a minimize button or default window menu.

A panel contains one or more boxes. A box contains one or more controls. The default configuration contains one box, which is adequate for most Front Panel setups.

A third container type is the subpanel, with which you are already familiar. In a configuration context, a subpanel contains controls, similar to a box.

Another container type, the switch, is the middle panel in the Front Panel, and it contains the virtual screen manager and the four small controls that immediately surround it.

A control is an icon like the Mail and Calendar icons discussed earlier in the chapter in the section "The Desktop Environment."

Let's go through the steps of removing a control from the default configuration of the Front Panel. Suppose you decide to delete the Mail control because you don't use the CDE mail reader.

The Mail control is a built-in control, which means that it comes in the default configuration and must be explicitly removed with a DELETE directive rather than simply left out of the configuration.

The first step is to create a new .fp file in your Front Panel configuration directory, which is $HOME/.dt/types. Almost all desktop modifications are made from the types branch of the directory tree:


cd $HOME/.dt/types

cp /usr/dt/appconfig/types/(LANGUAGE)/dtwm.fp ./mymail.fp

chmod +w mymail.fp

Previous | Table of Contents | Next