 |
Managing DECwindows Motif for OpenVMS Systems
4.3.2 Changing Your Logo
You must use the Start Session screen for logging in to DECwindows, but
you can substitute your own logo for the Digital logo by running an
application that displays your logo.
To do this, you need to define a global symbol in the
DECW$PRIVATE_APPS_SETUP.COM file and create a DCL command file that
contains the commands to display your logo.
To display your own logo on the login screen, you need to:
- Create a command file (SYS$MANAGER:LOGO.COM, for example).
- Define the global symbol DECW$LOGINLOGO in
SYS$MANAGER:DECW$PRIVATE_APPS_SETUP.COM, with its value set to the name
of your command file. Note that this command file is run by the system
account.
To create a custom logo, execute the following steps:
- If the SYS$MANAGER directory does not contain a command file, copy
the template file to a command file:
$ COPY SYS$COMMON:[SYSMGR]DECW$PRIVATE_APPS_SETUP.TEMPLATE -
_$ SYS$SPECIFIC:[SYSMGR]DECW$PRIVATE_APPS_SETUP.COM/LOG
|
- Edit the file and define the symbol DECW$LOGINLOGO to point to the
command file that displays your custom logo.
Add the following line:
$ DECW$LOGINLOGO == "SYS$MANAGER:MYLOGO.COM"
|
- Create the command file that displays your logo. This needs to be
the file name and directory specified in step 2. Note that the command
file runs as a detached process under the SYSTEM account. Be careful
not to give users access to the system through your custom logo. Do not
run applications like FileView or DECterm as a custom logo.
For
example, the file SYS$MANAGER:MYLOGO.COM could contain this command to
display the icosahedron that is shipped as an example program:
- Restart DECwindows by running DECW$STARTUP, or reboot your
workstation. Ending the session does not display the logo unless you
execute the DECW$STARTUP command procedure that starts DECwindows.
$ @SYS$STARTUP:DECW$STARTUP RESTART
|
Caution
Restarting the DECwindows server disconnects all current client
processes.
|
To restore the Digital logo, you need to remove the definition of
DECW$LOGINLOGO from your DECW$PRIVATE_APPS_SETUP.COM file and restart
DECwindows.
4.3.3 Creating Dedicated Accounts
If you are a system manager, you can set up user accounts to run only
certain applications. For example, you might want users to use only the
Bookreader application.
This section describes the following three methods for setting up
dedicated DECwindows accounts:
- Modifying the Session Manager command procedure
- Modifying the Session Manager executable file
- Modifying the Session Manager profile file
4.3.3.1 Modifying the Session Manager Command Procedure
You can define the global symbol DECW$SESSIONCOM in the
SYS$MANAGER:DECW$PRIVATE_APPS_SETUP.COM file so that when a user logs
in, LOGINOUT runs a command file other than DECW$STARTSM.COM. This
action bypasses Session Manager altogether.
In Example 4-1, DECW$SESSIONCOM is defined in
DECW$PRIVATE_APPS_SETUP.COM to point to the private command procedure
SYS$MANAGER: PRIVATE_SESSIONCOM.COM. The default command file is
SYS$MANAGER:DECW$STARTSM.COM.
Because DECW$SESSIONCOM is defined in the system logical name table, it
affects Session Manager startup for every user name. Your private
command file must check the user name under which it is running and run
the normal DECW$STARTSM.COM procedure for nondedicated accounts.
Note
With this method, the following startup command procedures (normally
executed from DECW$STARTSM.COM) do not run: SYLOGIN.COM, LOGIN.COM,
DECW$SYLOGIN.COM, and DECW$LOGIN.COM.
|
To modify the Session Manager command procedure:
- Create the command procedure shown in Example 4-1.
Example 4-1 Using a Private Session Manager
Command File |
$ CREATE SYS$MANAGER:PRIVATE_SESSIONCOM.COM
$!
$! Check to see whether this is the dedicated DECwindows account.
$! If it isn't, run the normal procedure to start Session Manager.
$!
$ username = F$USER()
$ IF F$LOCATE("BOOK_READER", username) .NE. F$LENGTH(username) -
THEN GOTO dedicated
$!
$! Normal, nondedicated DECwindows login
$!
$ @SYS$MANAGER:DECW$STARTSM
$ EXIT
$!
$! Dedicated DECwindows login. Run Bookreader and then exit.
$!
$ dedicated:
$!
$ RUN SYS$SYSTEM:DECW$WSINIT
$ display = F$TRNLNM("DECW$DISPLAY")
$ RUN/DETACHED/OUTPUT='display' SYS$SYSTEM:DECW$MWM (1)
$ RUN SYS$SYSTEM:DECW$BOOKREADER
$ endsession := $DECW$ENDSESSION (2)
$ endsession -noprompt (3)
$ STOP/ID=0 (4)
|
- DECW$MWM is the Motif Window Manager. Its
SYS$OUTPUT definition needs to be set to the translation of
DECW$DISPLAY so that DECW$DISPLAY is defined correctly in the detached
process.
- DECW$ENDSESSION resets the server and displays
a Start Session dialog login box.
- The -noprompt qualifier prevents
DECW$ENDSESSION from asking the user to confirm whether to end the
session. (If the user cancels the End Session operation, the
workstation will be unusable because Bookreader will exit and the login
box will not be displayed.)
- STOP/ID=0 logs out the process without
writing an error message to SYS$OUTPUT.
- Define the DECW$SESSIONCOM symbol in DECW$PRIVATE_APPS_SETUP.COM as
follows:
$ DECW$SESSIONCOM :== SYS$MANAGER:PRIVATE_SESSIONCOM.COM
|
If SYS$MANAGER:DECW$PRIVATE_APPS_SETUP.COM does not already exist,
create it as follows from the template file:
$ COPY SYS$MANAGER:DECW$PRIVATE_APPS_SETUP.TEMPLATE -
_$ SYS$COMMON:[SYSMGR]DECW$PRIVATE_APPS_SETUP.COM
|
- Restart DECwindows by entering the following command:
$ @SYS$MANAGER:DECW$STARTUP RESTART
|
This step is necessary for the changes to
DECW$PRIVATE_APPS_SETUP.COM to take effect.
- Log in to the dedicated account on a DECwindows system.
After
entering the user name and password of the dedicated account,
Bookreader starts and Session Manager is not displayed. When the user
exits from Bookreader, the PRIVATE_SESSIONCOM.COM procedure ends the
session operation and then logs out. The End Session command displays
the Start Session screen.
4.3.3.2 Modifying the Session Manager Executable File
You can define DECW$SESSIONMAIN in the SYS$MANAGER:
DECW$PRIVATE_APPS_SETUP.COM file so that DECW$STARTSM.COM runs the
specified command file instead of DECW$SESSION.EXE. Session Manager
reads resource files and executes login command files but does not
display the Session Manager menu bar. With this method, ensure that the
End Session command does not prompt for confirmation.
When DECW$STARTSM.COM starts (that is, if DECW$SESSIONCOM has its
default value), it starts Session Manager by executing the DCL command
that is stored in the logical name DECW$SESSIONMAIN. To define this
logical name, edit SYS$MANAGER: PRIVATE_APPS_SETUP.COM so that it
defines the global symbol DECW$SESSIONMAIN as the DCL command to
execute.
This method is similar to the one described in the Section 4.3.3.1 except
that, with this method, DECW$STARTSM.COM executes the SYLOGIN.COM,
LOGIN.COM, DECW$SYLOGIN.COM, and DECW$LOGIN.COM command procedures.
Also, DECW$STARTSM.COM executes DECW$WSINIT.EXE, so the private command
procedure does not need to do so.
To modify the Session Manager executable file:
- Create the command procedure shown in Example 4-2.
Example 4-2 Modifying the Session Manager
Executable File |
$ CREATE SYS$MANAGER:PRIVATE_SESSIONMAIN.COM
$!
$! Check to see whether this is the dedicated DECwindows account.
$! If it isn't, run the normal procedure to start Session Manager.
$!
$ username = F$USER()
$ IF F$LOCATE("BOOK_READER", USERNAME) .NE. F$LENGTH(USERNAME) -
THEN GOTO dedicated
$!
$! Normal, nondedicated DECwindows login
$!
$ RUN SYS$SYSTEM:DECW$SESSION
$ EXIT
$!
$! Dedicated DECwindows login. Run Bookreader and then exit.
$!
$ dedicated:
$!
$ display = F$TRNLNM("DECW$DISPLAY")
$ RUN/DETACHED/OUTPUT='display' SYS$SYSTEM:DECW$MWM (1)
$ RUN SYS$SYSTEM:DECW$BOOKREADER
$ endsession := $DECW$ENDSESSION (2)
$ endsession -noprompt (3)
$ STOP/ID=0 (4)
|
- DECW$MWM is the Motif Window Manager. Its
SYS$OUTPUT definition needs to be set to the translation of
DECW$DISPLAY so that DECW$DISPLAY is defined correctly in the detached
process.
- DECW$ENDSESSION resets the server and
displays a new Start Session screen.
- The -noprompt qualifier prevents
DECW$ENDSESSION from displaying the End Session prompt. (If the user
cancels the End Session prompt, the workstation will be unusable
because Bookreader will exit and the Start Session screen will not be
displayed.)
- STOP/ID=0 logs out the process without
writing a message to SYS$OUTPUT.
- Define the DECW$SESSIONMAIN symbol in DECW$PRIVATE_APPS_SETUP.COM.
Edit this command procedure to define DECW$SESSIONMAIN. Note that
the symbol must be defined as a DCL command (unlike DECW$SESSIONCOM,
which is defined as the name of a command procedure).
$ DECW$SESSIONMAIN :== @SYS$MANAGER:PRIVATE_SESSIONMAIN.COM
|
If SYS$MANAGER:DECW$PRIVATE_APPS_SETUP.COM does not already exist,
create it as follows from the template file:
$ COPY SYS$MANAGER:DECW$PRIVATE_APPS_SETUP.TEMPLATE -
_$ SYS$COMMON:[SYSMGR]DECW$PRIVATE_APPS_SETUP.COM
|
- Restart DECwindows by entering the following command:
$ @SYS$MANAGER:DECW$STARTUP RESTART
|
This step is necessary for the changes to
DECW$PRIVATE_APPS_SETUP.COM to take effect.
- Log in to the dedicated account on a DECwindows system.
After entering the user name and password of the dedicated account,
Bookreader starts and the Session Manager menu bar is not displayed.
When the user exits Bookreader, the PRIVATE_SESSIONMAIN.COM procedure
performs an End Session operation and then logs out. The End Session
command displays a DECwindows Start Session screen.
4.3.3.3 Modifying the Session Manager Profile File
This method starts Session Manager normally, but the system manager
customizes its menus to remove any applications that are not started
automatically. By removing certain applications, you can limit user
access to applications.
With this method, the Session Manager menu bar is displayed, and the
user can interact with whatever dialog boxes the system manager does
not disable.
To modify the Session Manager profile file:
- Log in to the dedicated account on a DECwindows system.
When
you enter the user name and password of the dedicated account, Session
Manager starts.
- Add the applications to the automatic startup list that you want to
be displayed when a user logs in.
Choose Automatic Startup... from
the Session Manager Options menu. Session Manager displays the
Automatic Startup dialog box. Use this dialog box to remove any
undesired applications, such as FileView, from the automatic startup
list. (For more information about using the Automatic Startup dialog
box, see Using DECwindows Motif for OpenVMS.)
Note
Do not remove Window Manager from the automatic startup list.
|
For this example add Bookreader to the list and click on OK.
- Remove Applications from the Session Manager menu bar.
Choose
Menu Bar... from the Session Manager Options menu. Session Manager
displays the Menu Bar dialog box. Use this dialog box to remove the
applications you do not want to be displayed. (For more information
about using the Menus dialog box, see Using DECwindows Motif for OpenVMS.) Click on OK
to save your changes and to dismiss the dialog box.
- Choose Save Session Manager from the Session Manager Options menu
to save your menu bar settings.
- Remove any menu items that you do not want to be displayed on the
Options menu.
Choose Menus... from the Session Manager Options menu
and remove the following menu items from the Session Manager Options
menu:
- Automatic Startup...
- Menus...
- Menu Bar...
- Save Session Manager
You should also remove any other menu items that you do not want
users to have access to in the dedicated account, such as Security.
After removing the items, click on OK to dismiss the dialog box and
to save your menu settings.
- Choose End Session from the Session Manager Session menu.
Session Manager logs you out of the dedicated account and displays
the DECwindows login box.
- Log back in to the dedicated account.
To test your changes, log in to the dedicated account from the
DECwindows login box. Bookreader and Session Manager should start up by
default, and you should not be able to start any other application. To
log out, choose End Session from the Session Manager menu.
If you decide to make the account nondedicated again, or if you want to
make changes in a dialog box that you have removed from the system menu
bar, delete or rename the file VUE$PROFILE.VUE$DAT in the dedicated
account's SYS$LOGIN directory.
4.4 Modifying Session Manager Behavior
You can modify the behavior of the DECwindows Session Manager by using
several logical names. These logicals are not normally used; however,
they may help in special circumstances, such as running two Session
Managers on the same system. Table 4-2 lists the logicals and their
meaning.
Table 4-2 Session Manager Logicals
Logical Name |
Meaning |
DECW$VUENOAUTOSTART
|
Prevents applications in the Session Manager autostart list from being
started.
|
DECW$VUENORESET
|
Prevents Session Manager from resetting the display server when Session
Manager exits.
|
DECW$VUELOGINOUTPUT
|
Saves any output from the login command files (SYSLOGIN, LOGIN,
DECW$LOGIN) as applications start up from Session Manager. You can
access this information by clicking on the SHOW OUTPUT button in the
Work in Progress dialog box, which is located in the Session menu in
the Session Manager window.
|
You can define these logicals in a DECterm or in the login command
files (SYSLOGIN, LOGIN, DECW$LOGIN). To set any of these logical,
define the logical name to any value, as in the following example:
$ DEFINE DECW$VUENOAUTOSTART 1
|
4.5 Modifying System Resource Files
Most DECwindows applications provide dialog boxes that contain options
for customizing your DECwindows environment and saving your settings.
For example, using Session Manager Options menu, you can look at many
predefined settings and then choose and save new settings.
However, not all applications provide dialog boxes for changing and
saving settings. For example, some applications let you change and save
the size or location of the application's main window and others do
not. To change and save settings that are not available from dialog
boxes, you can specify resources in a DECW$XDEFAULTS.DAT file.
Caution
Use extreme caution when modifying resources for the following reasons:
- Options dialog boxes cannot be used to change settings that are
specified in the DECW$XDEFAULTS.DAT file.
- In future DECwindows releases, application dialog boxes might
contain the options you have added to your Xdefaults file. You will
have to modify your DECW$XDEFAULTS.DAT file to reflect these changes.
- Error handling for resources is not available in this version of
DECwindows. Syntax errors in resource files might cause DECwindows to
fail without providing error messages.
- Using a large DECW$XDEFAULTS.DAT file significantly degrades
application startup performance.
|
To use resources to change application settings, create a file
(DECW$XDEFAULTS.DAT) in the directory specified by the logical name
DECW$USER_DEFAULTS. In this file, specify the resources for the
application settings you want to change. Alternatively, if your changes
are specific to one application, you can modify that application's
resource file (for example, DECW$MAIL.DAT).
Note that each resource specification in the DECW$XDEFAULTS.DAT file
follows explicit syntax rules. For more information about the resource
syntax, see the VMS DECwindows Guide to Xlib (Release 4) Programming: MIT C Binding or X Window System.
See Using DECwindows Motif for OpenVMS for resource information for the following
applications:
- Bookreader
- Calculator
- Calendar
- Cardfiler
- CDA Viewer
- Clock
- DECterm
- FileView
- Session Manager
- LinkWorks Manager
- Mail
- Motif Window Manager
4.6 Customizing Print Formats
This section describes how to define print formats and lists the
logical names and associated print formats for DECwindows Motif software.
Depending on your configuration, DECwindows Motif customization tasks can
include defining logical names to specify print formats.
Before you start up the system, edit the OpenVMS startup procedure to
define the logical names that associate print queues with print
formats. This startup procedure will subsequently call the
DECwindows Motif startup procedure. You can also add these logicals to
your login command file.
4.6.1 Defining Print Formats
Many DECwindows Motif applications use the Print dialog box to queue files
or screens to a printer. By default, all printing devices on the system
are displayed in the Printer list box. However, print queues can be
associated with print formats through the definition of logical names.
You define the logical name in the OpenVMS startup command procedure
before the call to the DECwindows Motif startup procedure. Separate the
list of print queues with commas or spaces, with the first queue being
the default choice.
You can customize the list of printer queues displayed in the Print
dialog box by defining any of the logical names in Table 4-3. This
method is faster than making the Print dialog box derive the names of
all the queues on the system, most of which do not apply to the print
format under consideration. The following example shows how to define
logical names for print formats in the OpenVMS startup files:
$ Define DECW$PRINTER_FORMAT_TEXT "CLUSTER_LN03,CLUSTER_PRINT, -
_$ ANSI_ARTWRK,ANSI_PROTON"
$ Define DECW$PRINTER_FORMAT_LINE "CLUSTER_PRINT"
$ Define DECW$PRINTER_FORMAT_ANSI2 "CLUSTER_LN03,ANSI_ARTWRK,ANSI2_PROTON"
$ Define DECW$PRINTER_FORMAT_ANSI "CLUSTER_LN03,ANSI_ARTWRK,ANSI_PROTON"
$ Define DECW$PRINTER_FORMAT_PS "PS_ARTWRK,PS_PROTON"
$ Define DECW$PRINTER_FORMAT_REGIS "SYS$NULL"
|
For example, if DECW$PRINTER_FORMAT_ANSI2 is defined as CLUSTER_LN03,
ANSI_ARTWRK, ANSI2_PROTON, then when you select ANSI2 from the Print
Format list box, only CLUSTER_LN03, ANSI_ARTWRK, and ANSI2_PROTON are
shown in the Printer list box, with CLUSTER_LN03 being the default
choice.
4.6.2 Logical Names and Print Formats
Table 4-3 lists the logical names and the associated print formats
in the DECwindows Motif product.
Table 4-3 Logical Names for the Print Dialog Box
Logical Name |
Print Format |
DECW$PRINTER_FORMAT_DEFAULT
|
Default
|
DECW$PRINTER_FORMAT_TEXT
|
Text
|
DECW$PRINTER_FORMAT_LINE
|
Line printer
|
DECW$PRINTER_FORMAT_TERM
|
Terminal
|
DECW$PRINTER_FORMAT_ANSI2
|
ANSI2
|
DECW$PRINTER_FORMAT_ANSI
|
ANSI
|
DECW$PRINTER_FORMAT_PS
|
PostScript
|
DECW$PRINTER_FORMAT_REGIS
|
ReGIS
|
DECW$PRINTER_FORMAT_TEK
|
TEKTRONIX
|
DECW$PRINTER_FORMAT_DDIF
|
DDIF
|
You can define the logical names in systemwide logical name tables and
users can override the logicals when necessary.
|