-->
Page 91
CONTROL Dtmanpageview { TYPE file CONTAINER_TYPE SUBPANEL CONTAINER_NAME HelpSubpanel POSITION_HINTS last ICON Dthover FILE_NAME /usr/dt/appconfig/appmanager/C/Desktop_Apps/Dtmanpageview HELP_STRING The Man Page Viewer (Dtmanpageview) action displays a  man page in a Quick Help viewer window. }
This is what the Install Icon tools insert into a file when the Man Page viewer icon is dragged into it. The two important directives are CONTAINER_TYPE and CONTAINER_NAME, which specify the container type, a SUBPANEL, and its name.
The Install Icon control is probably the best mechanism to use when possible because it avoids errors and installs nice extras, such as the help information shown in the preceding example.
When you click controls on subpanels, their default behavior is to close. You can override this but to do so, you must modify the default PANEL definition.
Create a file named main.fp file in $HOME/.dt/types. To main.fp, copy the default PANEL definition found in /usr/dt/appconfig/types/C/dtwm.fp. (It starts at approximately line 18.)
PANEL FrontPanel { DISPLAY_HANDLES True DISPLAY_MENU True DISPLAY_MINIMIZE True CONTROL_BEHAVIOR single_click DISPLAY_CONTROL_LABELS False HELP_TOPIC FPOnItemFrontPanel HELP_VOLUME FPanel }
Add the following directive:
SUBPANEL_UNPOST False
This is a good example of how to take advantage of the way the Front Panel is dynamically constructed every time the CDE is initialized. A site administrator can add this modification, also, to the /etc/dt/appconfig/types/C area.
The Workspace Manager always saves a backup of the last session when it saves a new one. If something goes wrong, this backup session can be activated in order to restore a login to working order.
Page 92
Log in as the user with either the Fail-safe or CommandLine Login, or by switching to one of the virtual terminals.
Change to the $HOME/.dt/sessions directory. The old session is in the current.old directory. Copy it to the current directoryfor example,
cd current.old; find . | cpio -pdmv ../current
When users log in to the desktop for the first time, the script sys.session in /usr/dt/config/language/ is executed. It starts up a few desktop applications, including the Help Viewer.
Like most files that accompany the default CDE package, this copy of sys.session shouldn't be modified. Instead, users should place a new copy in /etc/dt/config/language/ and modify it there. After a user logs out for the first time, he or she will have either a home or last session for the desktop to restore, so this script will not run again.
You might want to execute commands when you log in that cannot be set up via the CDE, such as daemon processes, or perhaps an application such as xv or xsetroot in order to place an alternative root window background. To do so, place a script named sessionetc in the directory named $HOME/.dt/sessions.
For example, the following script would place the file companylogo.jpg as the background at login:
#!/bin/sh xv -root -rmode 5 -maxpect -quit $HOME/images/companylogo.jpg
NOTE |
Backgrounds set by xv are only visible when NoBackdrop is selected in the CDE Style Manager. |
sessionetc is executed as a shell script. Therefore, either xv must be in the user's search path, or the path must be fully qualified. In addition, the user must ensure that the path to the image is correct and that the script has the executable bit for owner set. Also, any programs run by sessionetc should either execute and exit in a timely manner or become background because the script is run in serial with the rest of the login process. Any programs remaining in the foreground for a long time will result in a delayed login.
Page 93
A similar script, sessionexit, can be placed in the same directory with commands to be executed on logout, such as cleaning up a temporary directory or backing up some files. Like sessionetc, the proper path must be available for any programs that are run, and the programs that are run should either exit quickly or be placed in the background.
The CDE help facility is a welcome sight to the new UNIX user. It provides fully indexed hyperlinks to topics about all the desktop applications and the desktop itself. It also provides context-sensitive help from all the applications.
The Help Viewer is effectively a replacement for "treeware" (paper) documentation. Help is divided into volumes, such as one for the File Manager, one for the Front Panel, and another for the Help Viewer itself. This, combined with the viewer's powerful search system, provides users with the ability to rapidly access exactly the information they need.
The top portion of the window always displays a table of contents for the volume currently in use (see Figure 6.6). The bottom portion displays the help document for the current topic. On the right are navigation buttons for bringing up an index or a history window, for backtracking to previously visited topics, and for jumping directly to the top-level topic in the currently selected volume.
The index is one of the more powerful features included in the Help Viewer. Help volumes are selected in a simple dialog box and can be displayed as tiered indexes or searched. From the index window, the desired help topic can be displayed.
The history window provides rapid access to the help topics visited in the current help session. It also organizes topics into volumes.
All CDE controls have a Help option. Place the mouse over the Style Manager control, right-click with the mouse, and select the Help option.
The Help Viewer not only springs to life, but it displays a topic relevant to the control that has focus. This will also happen inside any CDE application. Try it from the Text Editor or Application Manager.
The control labeled On Item Help produces similar behavior as the F1 key if the control has focus. (When a control has focus, it is framed with a box.)