In this section we'll add some Virtual Partition-related commands to our CDE menu. Since most Virtual Partition work is performed by the system administrator, we'll update the menu picks for root only in the upcoming example. The default information for the login screen is contained in /usr/ dt/config/C/Xresources. We'll copy this file to the home directory and .dt directory for root, which, on this vPar, is /.root/.dt. We'll rename the file dtwmrc after copying it. The menu portion of /.root/.dt/dtwmrc looks like the following before it is updated: Menu DtRootMenu { "Workspace Menu" f.title "Shuffle Up" f.circle_up "Shuffle Down" f.circle_down "Refresh" f.refresh "Minimize/Restore Front Panel" f.toggle_frontpanel no-label f.separator "Restart Workspace Manager..." f.restart no-label f.separator "Log out..." f.action ExitSession } We're going to add our new menu pick just after the DtRootMenu entry, which we see on our system as the left mouse button's "Workspace Menu." After adding our menu picks the file now looks like the following: Menu DtRootMenu { "Workspace Menu" f.title "Shuffle Up" f.circle_up "Shuffle Down" f.circle_down "Refresh" f.refresh "Minimize/Restore Front Panel" f.toggle_frontpanel no-label f.separator "Restart Workspace Manager..." f.restart no-label f.separator "Log out..." f.action ExitSession Menu vParMenu "vPar Menu" f.title "vparstatus" f.exec "xterm -T vparstatus -e /usr/bin/sh -c 'vparstatus; read xxx'" "vparstatus -v" f.exec "xterm -geometry 80x50+830+0 -sl 200 -bg white -T vparstatus_verbose -e /usr/bin/sh -c 'vparstatus -v|more; read xxx'" "Login vPar2" f.exec "xterm -geometry 80x50+830+0 -sl 200 -bg white -T vPar2 -e remsh ecvpard2 &" } The f.title function shows that this is the menu title. f.exec means to execute the following string. In the first menu pick, vparstatus, we simply open an xterm window, run the vparstatus command, and wait for user input before we close the window with read. The next command uses vparstatus -v which has a more extensive output. For this command I open a much bigger xterm window and run vparstatus -v|more so the user can hit the spacebar if the command results in more than one window of output. (There is a single quote around the vparstatus and read commands.) I included yet more options on the xterm for the remote login to the second vPar, making the terminal window very large, with lots of terminal memory and using specific colors. Our new menu now looks like that shown in Figure 14-2: Figure 14-2. vPars Menu Picks These menu picks give us vPar status, status with verbose output, and a remote login to our second vPar. Issuing these commands open up windows and execute the commands shown in our menu picks. Figure 14-3 shows a screen shot with the two vparstatus windows open from having selected the two vparstatus commands from the menu: Figure 14-3. Screen Shot Showing Two vparstatus Windows The upper left-hand window contains the output of vparstatus and the right-hand window contains the output of vparstatus -v. The updated menu is shown in the lower left of the screen. We can perform additional CDE customization, such as create workspaces for our vPars so that when we select a workspace we have windows open to the vPar for which the workspace is named. The remainder of this chapter provides CDE backgound. We performed only basic customization to CDE for our vPars environment. You can perform extensive customization in CDE. The background provided in the remainder of this chapter provides information that can help you with additional customization. |