Getting Started With the New Desktop
AA--QUW1A--TE


Previous page... | Contents

When a user or an application reads from CDE$USER_DEFAULTS, CDE$USER_SPECIFIC:[*...] is searched before CDE$USER_COMMON:[*...].

When a user or an application writes a file to CDE$USER_DEFAULTS:[*...], it is placed in the CDE$USER_SPECIFIC:[*...] hierarchy. To write a file to CDE$USER_COMMON:[*...], you must specify CDE$USER_COMMON.

3.3.4 Configuration Directories for User Customizations

When you first log in to the New Desktop, a user-specific configuration directory hierarchy is created for you, as shown in Table 3-3. The following top-level directory of this hierarchy is placed in your home directory:

 
disk$:[user.DT]  

This directory hierarchy contains information that is specific to an individual user. The information in this directory overrides or supplements any resources or customizations found in the system-specific configuration directories (CDE$USER_DEFAULTS:[*...]).

The disk$:[user.DT...] directory hierarchy contains an error log, user-defined configuration files for Application Manager, session state and save-and-restore information, user-customized backdrops, help configuration files, icons, and palettes.

Table 3-3 Private Directories Created When You First Log In
Directory Contents
disk$:[user.DT.APPMANAGER] Private application groups
disk$:[user.DT.DESKTOP] Information to restore icons dropped on the desktop
disk$:[user.DT.HELP] Private help files
disk$:[user.DT.ICONS] Private icon files
disk$:[user.DT.PALETTES] Private palette files
disk$:[user.DT.SESSIONS] Session state and save-and-restore information work area
disk$:[user.DT.TMP] Temporary files created by the New Desktop
disk$:[user.DT.TRASH] Files moved to the Trash Can and information for processing them
disk$:[user.DT.TYPES] Private action definitions

3.3.5 Order of Precedence of Data Files

The order of precedence for data files read by New Desktop applications is:

  1. disk$:[user.DT...]
  2. CDE$USER_SPECIFIC:[*...]
  3. CDE$USER_COMMON:[*...]
  4. CDE$SYSTEM_DEFAULTS:[*...]

3.4 Customizing the Environment and Applications

You can customize your New Desktop environment in several ways. Most customizations are made by modifying resource files. You can modify them directly by editing them or by using the xrdb utility, or you can modify them indirectly with Style Manager.

You can also customize your environment by adding or modifying actions. You can add new actions or modify existing actions with the Create Action application (see Section 4.1). Alternatively, you can add new actions or modify existing actions by creating or editing action definition files and their associated files.

3.4.1 Using Resource Files With the New Desktop

The New Desktop, like any X windows environment, uses resource files to define global and application-specific attributes. Global resources are read when you log in to the New Desktop. They apply to all applications. Application-specific resources are read when a specific application is started.

Most resources files currently in use with the DECwindows desktop will continue to work under the New Desktop. The logical name DECW$SYSTEM_DEFAULTS for systemwide resources and the logical name DECW$USER_DEFAULTS for user-specific resources are still searched. The global user defaults file DECW$USER_DEFAULTS:DECW$XDEFAULTS.DAT is still read at login time.

However, some differences exist with the New Desktop. Global systemwide resources are read from the SYS.RESOURCES and SYS.FONT files in the CDE$SYSTEM_DEFAULTS:[CONFIG.C] directory. User-specific global resources are read from the DECW$USER_DEFAULTS:DECW$XDEFAULTS.DAT file and from the user's DT.RESOURCES file, which resides in a subdirectory of disk$:[user.DT.SESSIONS]. The choice of the subdirectory depends on the session type (current or home) you are using.

The DT.RESOURCES file contains customizations specified by running the New Desktop Style Manager. These resource files serve basically the same purpose as the DECW$SMB_*.DAT files of the DECwindows desktop, which are created using Session Manager's Options pull-down menu. With few exceptions, anything that you can customize with the DECwindows Session Manager's Options pull-down menu is customizable with the New Desktop Style Manager.

Systemwide, application-specific resources for the CDE applications included in the New Desktop are placed in the CDE$SYSTEM_DEFAULTS:[APP-DEFAULTS.C] directory. This directory is searched if the resource file is not found in the DECW$SYSTEM_DEFAULTS: directory. The complete directory hierarchy for files provided with the New Desktop in described in Section 3.3.


All resource identifiers, such as *hostList: and *keyboardDialect:, are case sensitive. The value that you supply after the colon (:) is usually not case sensitive, but this depends on how the applications interpret the value. File name resource values are not case sensitive.

3.4.2 Using Actions With the New Desktop

An action is an association of a name and, in many cases, an icon with an executable command. The File Manager and Front Panel use actions to present an iconic representation of operations that can be performed, in the case of the File Manager, on a particular file. Actions are defined in action definition files (file types .DT and .FP) that are placed in any of the directories designated by the action definition file search path DTDATABASESEARCHPATH. For more information about actions, see Section 4.1.

3.4.2.1 Data Typing

All files represented by the File Manager have one or more actions associated with them. The determination of which actions apply to which files is established by data typing. The most common form of data typing is the specification of a file name pattern. For example, a file with a .COM extension has a data type of COM_FILE, which in turn has actions of Open (edit) and Run. Run is the default action for command procedures, which means that double clicking on the icon for a file with the .COM extension will run it. You can customize the action database by using the Create Action application or by editing .DT files, which define the action database.

3.4.2.2 Action (Stub) Files

An action file is an empty file with the same name as an action. An action file must have execute permissions enabled.

An action file is used by File Manager to create a reference to the icon representing the action. The Create Action application automatically creates this file in your SYS$LOGIN directory when you select the Save option from the File pull-down menu. Action files can be moved to application groups or placed on the desktop window.


Action names are case sensitive. They must be lowercase both to match action files and to be used by File Manager and Application Manager.

3.4.3 Security Settings

In the DECwindows desktop, security access is enabled via Session Manager's Options pull-down menu. Once access is specified, changes are saved in the DECW$USER_DEFAULTS:DECW$SMB_SECURITY.DAT file (and referenced by the resource sm.host_list:).

When you first log in to the New Desktop, Session Manager (dtsession) reads any existing DECW$USER_DEFAULTS:DECW$SMB_SECURITY.DAT file and transfers the resource (sm.host_list:) to an appropriate resource (*hostList:) in the New Desktop. The resource is saved in your DT.RESOURCES file when you save a home session or exit your session.

You can modify security access for your session by using the graphical user interface provided in Style Manager. From the Style Manager menu bar, select Security and then add or delete authorized users.

3.4.4 Keyboard Settings

If you have a DECW$USER_DEFAULTS:DECW$SMB_KEYBOARD.DAT file in the DECwindows desktop environment, the value of the keyboard dialect resource (keyboard_dialect) is transferred to your New Desktop session when you first log in. The new name for this resource is *keyboardDialect.

You can use Style Manager to modify the keyboard dialect and input method selection. When you select the keyboard icon, a list box containing all possible keyboard mappings is displayed. When you select a keyboard mapping, it takes effect immediately. The resource is saved in your DT.RESOURCES file when you save a home session or exit your session.

3.4.5 Printer Management

Print Dialog provides the New Desktop with access to the DECwindows print widget for customizing and submitting print jobs. By default, Print Dialog saves its application state in the file disk$:[user.DT.TMP]DTPRINTINFO when the user clicks on the OK button. If the disk$:[user.DT.TMP] directory does not exist, or if the user does not click on the OK button prior to submitting the job, the Print Dialog settings selected are not used in the current print job.

If Print Dialog does not appear, or if the print job is not submitted, try deleting the latest version of the application state file in [username.DT.TMP] and reissuing the command.

3.4.5.1 Adding Printers to the Personal Printers Subpanel

Printers are represented as icons on the desktop. You can change the default printer and you can add additional printer icons to the Personal Printers subpanel, provided you have an action definition file, an action (stub) file, and an icon for each additional printer. The easiest way to create these three files is with the Create Action application (see Section 4.1.4).

A template printer action definition file is supplied with the New Desktop in the following location:

 
CDE$SYSTEM_DEFAULTS:[APPCONFIG.TYPES.C]PRINTER.DT_TEMPLATE  

Read this file for instructions on creating printer action definitions.

You can add printer icons to the Personal Printers subpanel using the following steps:

  1. Display the printer icon using File Manager.
  2. Display the Personal Printer subpanel.
  3. Drag the printer icon from File Manager to the Personal Printer subpanel and drop it on the Install Icon item.

3.4.5.2 Creating a Printer Subpanel Control Definition File

Dropping a printer icon on the Install Icon control at the top of the Personal Printers subpanel automatically creates a printer subpanel control definition file and adds the new printer control to the bottom of the subpanel.

A template file for a printer subpanel control definition file is available in the following location:

 
CDE$SYSTEM_DEFAULTS:[APPCONFIG.TYPES.C]PRINTER.FP_TEMPLATE  

Read this file for instructions on creating printer subpanel control definitions.

3.4.5.3 Changing the Default System Printer

To change the default system printer, add the following line to the
SYS$MANAGER:SYSTARTUP_VMS.COM file:

 
$ DEFINE/SYSTEM/EXECUTIVE_MODE SYS$PRINT printer-name 

3.4.5.4 Changing the Default Printer for Your Own Use

The default printer is the printer associated with the Printer icon on the Front Panel. By default, this printer is defined by the value of the SYS$PRINT logical.

To change the default printer for your own use, add the following line to your LOGIN.COM file:

 
$ DEFINE SYS$PRINT printer-name 

Alternatively, you can change the default printer for your own use by selecting a different printer from the list of available printers in the Printer Dialog box, as follows:

  1. Click on the printer icon on the Front Panel to display the Printer Dialog box.
  2. From the list of printers on your system, click on the printer you want as a new default printer.
  3. Click on OK.

Note that changing the default printer for Print Dialog does not change the default printer associated with the Print item on File Manager's Selected pop-up menu. You can change the default printer used by File Manager by following these steps:

  1. Click on the icon of the file you want to print.
  2. Click on the Selected item of the File Manager menu bar to display the Selected menu.
  3. Click on Print... to display the Printer Dialog box.
  4. From the list of printers on your system, click on the printer you want as a new default printer for File Manager.
  5. Click on OK.

The default printer and other options that you set using Print Dialog remain in effect until you change them again.

3.4.5.5 Print Dialog Command Line Options

Print Dialog accepts the command line options shown in Table 3-4. You can use these in a print command that you supply to the Create Action application (in the Add Datatype dialog box). You can also use them for printing a file from a DECterm with the options that you specified in the New Desktop environment, if you do not have access to the file's icon. You might also want to use Print Dialog from a DECterm for debugging print actions for your data types.

Table 3-4 Print Dialog Command Line Options
Option Description
-session sessionfile Loads the session file and restores the client to its original state on the desktop. By default, the session file name is determined at logout by the desktop.
-state statefile Loads the state file and restores the client to its original application state. By default, the state file is disk$:[user.DT.TMP]DTPRINTINFO.
-interface Displays the Print Dialog interface. By default, this value is FALSE.
-unmanage Unmanages the Print Dialog interface when the user clicks on the OK button. By default, this value is TRUE.
-printer print-queue Specifies the name of the printer to receive the print job request. The printer name saved in the application state file takes precedence over this option. By default, this value is set to the value of the default printer.
-default print-queue Specifies the name of the default printer to receive the print job request. The printer name saved in the application state file takes precedence over this option. By default, this value is set to the value of the SYS$PRINT logical of the system or to the printer name specified with the -printer option.
filenames Path names of the files to be printed. If this argument is used with the -interface option, the files are printed when the user clicks on OK.
-usage Displays the command line options.

3.4.5.6 Starting Print Dialog From a Command Line

To run Print Dialog from a DECterm window, define the following symbol:

 
  

To display Print Dialog, enter the following command:

 
  

To print a file, enter the following command:

 
  

3.4.6 Changing the Default Editor

The default editor of the New Desktop is the CDE Text Editor. If you prefer to use another editor, you can make it the default editor by following these steps:

  1. Copy the file CDE$SYSTEM_DEFAULTS:[APPCONFIG.TYPES.C]USER-PREFS.DT into your disk$:[user.DT.TYPES] subdirectory.
  2. Within the new copy of the file, revise the specification for "ACTION TextEditor".
    To use the DECwindows TPU editor, change MAP_ACTION from dtpad to dxeve. To run the TPU editor in a DECterm window, change MAP_ACTION from dtpad to tpuedit.

Both dxeve and tpuedit are preconfigured actions. These preconfigured actions may not be adequate if you are accustomed to editing with a customized TPU section file or with command files. To edit with a customized section file or with command files, you need to explicitly specify your edit command in an action definition file (see Section 4.1) and then map the TextEditor action to the new action name.

3.4.7 Window Colors and Screen Background

Window colors and screen background settings in the DECwindows desktop resource files (DECW$SMB_WINDOW_COLOR.DAT, DECW$SMB_BACKGROUND_COLOR.DAT) are not read into the New Desktop resources.

You can use Style Manager's Color dialog box to customize window colors and screen backgrounds in the New Desktop. You can specify a different background for each workspace, which can be useful for identifying them. You can also use the Color dialog box to troubleshoot the color display, as described in Section 3.6.

3.4.8 Window Manager Customizations

In the DECwindows desktop, Window Manager configuration customizations are specified in two files: DECW$MWM.DAT and DECW$MWM_RC.DAT. The New Desktop Window Manager supports configuration customization in two similar files: DTWM.DAT and SYS.DTWMRC, respectively.

3.4.8.1 Window Manager Resource File (DTWM.DAT)

The Window Manager default resource file, DTWM.DAT, is located in the CDE$SYSTEM_DEFAULTS:[APP-DEFAULTS.C] directory. Information stored in this file affects many aspects of the Window Manager, including the pointer focus, the icon box, the placement of the icon box, icon colors, use of the Front Panel, window border shading, window menu appearance, and workspace backdrop specifications. The following example shows part of the default DTWM.DAT file:

 
Dtwm*Dtstyle*iconImage:      Fpstyle  
Dtwm*Dthelpview*iconImage:   Fphelp  
Dtwm*backdrop*image: SkyLight  
Dtwm*ws0*backdrop*image: SkyLight  
Dtwm*ws1*backdrop*image: WaterDrops  
Dtwm*iconBoxGeometry:                         1x4+16+20  
Dtwm*iconBoxSBDisplayPolicy:                  horizontal  

Most of the resources defined in the DECwindows Window Manager resource file (DECW$MWM.DAT) can be used with the New Desktop's Window Manager by adding the applicable resources to DTWM.DAT and changing the application class name from Mwm to Dtwm. Note that customizations to the DECwindows Window Manager resource file (DECW$MWM.DAT) are not automatically carried forward to the New Desktop's Window Manager resource file (DTWM.DAT). The user or system manager must make the appropriate edits to the DTWM.DAT file.

As with all application resource files, user-specific customized versions of this file should be placed in the DECW$USER_DEFAULTS directory (which is typically the user's home directory). To put into effect any changes made to the Window Manager resource file, you must restart the Window Manager.

For more information about the Window Manager resources, refer to the Dtwm manpage.

3.4.8.2 Window Manager Resource Configuration File (SYS.DTWMRC)

The Window Manager resource configuration file for the New Desktop, SYS.DTWMRC, is available in CDE$SYSTEM_DEFAULTS:[CONFIG.C]. It is a supplementary resource file that is used with the Window Manager resource file (DTWM.DAT) to control much of the behavior of the New Desktop Window Manager.

In the DECwindows desktop, supplemental window manager configurations are made via the DECW$MWM_RC.DAT file. Information stored in this resource file affects the Window Manager Root Window Menu, customized key binding descriptions, mouse button binding descriptions, and other attributes. Customizations made to DECW$MWM_RC.DAT are not automatically carried forward to the New Desktop. You can update the New Desktop's SYS.DTWMRC file with previous customizations made to DECW$MWM_RC.DAT by doing the following:

  1. Copy CDE$SYSTEM_DEFAULTS:[CONFIG.C]SYS.DTWMRC to disk$:[user.DT]DTWMRC.DAT.
  2. Make any edits that you would like to the file. You can incorporate changes previously made to DECW$MWM_RC.DAT and make other edits.
  3. Restart the Window Manager to put these changes into effect.

Functional enhancements are available for DTWMRC.DAT, such as a series of new Workspace Manager functions (for example, f.create_workspace) to support the multiple-workspace environment. For more information about this new functionality, as well as more information about customizing DTWMRC.DAT, refer to the DTWMRC manpage.

3.4.9 Automatic Application Startup

The DECwindows desktop provides the Automatic Startup... option from Session Manager for specifying which applications should be started when you log in to a session. You can put additional customizations in the SYS$LOGIN:DECW$LOGIN.COM file.

The New Desktop provides a different technique for starting applications when you log in to a session. There are two options, both based on starting a default set of applications you want and then saving the state of your session: Resume Current Session or Return to Home Session.

Style Manager's Startup menu provides these options, as described in Section 2.1.11.

Applications are responsible for informing the New Desktop how to restart them. The CDE applications of the New Desktop give detailed information, including which windows are displayed, where they are positioned, and current values. The DECwindows applications, in general, provide only enough information for them to be restarted; no state information is preserved.

Optional DECwindows applications, such as DECwindows Notes, may not provide any information and therefore are not restarted. For such cases, there is a command procedure called disk$:[user.DT]SESSIONETC.COM, that you can use to start any applications that cannot be restarted automatically. This procedure is analogous to the DECW$LOGIN.COM procedure in the traditional DECwindows environment.

3.5 Using the New Desktop Error Logs

The New Desktop provides two log files by default---one for session startup and one for the session itself---and a third log file for the login process, if you define the symbol for it. These log files are described in the following list:

3.6 Using Colors in the New Desktop Environment

In the New Desktop, color allocation is centralized. A set of colormap entries is preallocated when a session starts. The default values for widget color resources are mapped to these colormap entries. All applications that do not explicitly set widget color resources will use the shared colormap entries. By using this approach you can dynamically change colors for all applications by changing the pixel values of the shared colormap entries.

In the New Desktop, the Session Manager acts as the color server for the desktop. It reserves and controls a portion of the X server's colormap, dividing it into a series of color sets. A color set consists of a color for each of the resources, as described in Table 3-5.

Table 3-5 Color Set Resources
Resource Description
Background An application's background color
Foreground An application's foreground color
topShadowColor The color for the top and left borders of application controls and the window frame
bottomShadowColor The color for the right and bottom borders of application controls and the window frame
selectColor The color used to highlight selected controls in the application


Next page... | Contents