 |
Using DECwindows Motif for OpenVMS
Chapter 13 Changing the Startup Environment
When a user enters a correct user name and password in the Start
Session dialog box, DECwindows runs several command and executable
files. A system manager or a user with privileges can customize this
startup sequence.
This chapter describes the DECwindows startup sequence and explains how
to customize it.
13.1 The Startup Sequence
By default, the following events occur when a user starts a session:
- The DECwindows DECW$LOGINOUT.EXE image modifies the security list,
allowing the current user to run clients to the server.
- The DECW$LOGINOUT.EXE image starts a process that holds a
connection to the server during the startup process.
- The DECW$LOGINOUT.EXE image exits and DCL takes control.
- DCL takes commands from Session Manager's DCL command file. By
default, this file is called SYS$MANAGER:DECW$STARTSM.COM.
- The SYLOGIN.COM file executes.
- The user's LOGIN.COM file executes. A user can redefine the
DECW$USER_DEFAULTS file at this time.
- The workstation initialization procedure executes. By default,
this file is called SYS$SYSTEM:DECW$WSINIT.EXE.
- If the user is logging in to VMS DECwindows Motif for the first
time, DECwindows scans the user's DECwindows XUI resource files and
creates new ones for Motif.
- The DECW$SYLOGIN.COM file executes.
- The DECW$LOGIN.COM file executes.
- DCL runs the Session Manager image. By default, this file is called
SYS$SYSTEM:DECW$SESSION.EXE.
- End Session is executed. By default, there is no End Session
executable file. Session Manager handles End Session in the default
client setup.
13.2 Customizing the System Startup Environment
To customize the system startup environment, rename the
SYS$MANAGER:DECW$PRIVATE_APPS_SETUP.TEMPLATE file to
SYS$MANAGER:DECW$PRIVATE_APPS_SETUP.COM. You can modify
SYS$MANAGER:DECW$PRIVATE_APPS_SETUP.COM to customize the following
client environment areas:
- Directory used by Bookreader to find online books
- Directory for FileView command files
- Directory for Keymap files
- Directory for DECwindows example programs
- Directory for XDPS example programs
- Directory for Session Manager menu bar command files
- Program that runs when DECwindows startup is complete
- Login logo
- Parameters to the SET DISPLAY command
- Command procedure that runs after user authorization is complete
- DECwindows SYLOGIN command procedure
- Command that initializes the workstation with the correct user
resource values
- Command that runs a session
- Command that resets a session
- Log file for DECwindows loginout
- Use of multiple connections during loginout
- Log file for Session Manager can be turned off
The remaining sections in this chapter contain examples for customizing
the DECwindows client environment.
13.3 Changing Your Logo
The default login screen, featuring the DIGITAL logo and the Start
Session screen, is displayed. For an example of the login screen, see
Chapter 2.
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. For example, to display
your own logo on the login screen:
- Create a command file (like SYS$MANAGER:LOGO.COM).
- 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.
For example:
- 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:[SYSMANAGER]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 will run as a detached process under the SYSTEM account. Be
careful not to give users access to the system through your custom
logo. For example, you should 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.
To return to the DIGITAL logo, you need to remove the definition of
DECW$LOGINLOGO from your DECW$PRIVATE_APPS_SETUP.COM file and reboot.
13.4 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
13.4.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 the following example, DECW$SESSIONCOM is a logical name that
determines the command file that starts Session Manager. The default
command file is SYS$MANAGER: DECW$STARTSM.COM. You can run a private
command file instead of this file by defining the global symbol
DECW$SESSIONCOM in SYS$MANAGER: DECW$PRIVATE_APPS_SETUP.COM. If this
symbol is defined, SYS$MANAGER: DECW$STARTAPPS.COM defines the
DECW$SESSIONCOM logical name in the system logical name table.
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 that with this method, startup command procedures that normally
start from DECW$STARTSM.COM are not run. These include SYLOGIN.COM,
LOGIN.COM, DECW$SYLOGIN.COM, and DECW$LOGIN.COM.
To modify the session manager command procedure:
- Create the command procedure.
$ 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 the
$! 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$LOGICAL("decw$display")
$ RUN/DETACHED/OUTPUT='display' SYS$SYSTEM:DECW$MWM
$ RUN SYS$SYSTEM:DECW$BOOKREADER
$ endsession := $DECW$ENDSESSION
$ endsession -noprompt
$ STOP/ID=0
^Z
|
The DECW$WSINIT program reads in resource files and changes the
input cursor from the watch cursor to the arrow cursor. DECW$MWM is the
Motif window manager. Its SYS$OUTPUT 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.
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
|
Then edit this command procedure as follows to define
DECW$SESSIONCOM:
$ DECW$SESSIONCOM :== SYS$MANAGER:PRIVATE_SESSIONCOM.COM
|
- Restart DECwindows by entering the following command:
$ @SYS$MANAGER:DECW$STARTUP RESTART
|
This step is necessary in order 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 performs an
end session operation and then logs out. The End Session command
displays the Start Session screen.
13.4.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 Session Manager's menu bar. With this method, you must also
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 preceding section,
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.COM, so the
private command procedure does not need to do so.
By default, DECW$STARTSM.COM executes DECW$ENDSESSION.EXE and STOP/ID=0
after the DECW$SESSIONMAIN command has exited. In this case, however,
you must make sure that End Session does not prompt for confirmation.
(If the user cancels an end session operation, the workstation will be
unusable). The private command procedure in the following example
explicitly runs DECW$ENDSESSION with the -noprompt switch.
To modify Session Manager's executable file:
- Create the command procedure.
$ 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 the
$! 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$LOGICAL("decw$display")
$ RUN/DETACHED/OUTPUT='display' SYS$SYSTEM:DECW$MWM
$ RUN SYS$SYSTEM:DECW$BOOKREADER
$ endsession := $DECW$ENDSESSION
$ endsession -noprompt
$ STOP/ID=0
^Z
|
DECW$MWM is the Motif Window Manager. Its SYS$OUTPUT 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.
If SYS$MANAGER:DECW$PRIVATE_APPS_SETUP.COM doesn't 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
|
Then 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
|
- Restart DECwindows by entering the following command:
$ @SYS$MANAGER:DECW$STARTUP RESTART
|
This step is necessary in order 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's menu bar is 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.
13.4.3 Modifying 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, a system manager can
limit user access to applications.
With this method, Session Manager's 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
Session Manager's 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
Chapter 7.) Do not remove Window Manager or Session Events from the
automatic startup list. Add Bookreader (for this example) to the
list and click on OK.
- Remove Applications from Session Manager's menu bar.
Choose
Menu Bar... from Session Manager's Options menu. Session Manager
displays the Menu Bar dialog box. Use this dialog box to remove the
applications you don't want to be displayed. (For more information
about using the Menus dialog box, see Chapter 8.) Click on OK
to save your changes and to dismiss the dialog box.
- Choose Save Session Manager from Session Manager's Options menu to
save your menu bar settings.
- Remove any menu items that you don't want to be displayed on the
Options menu.
Choose Menus... from Session Manager's Options menu
and remove the following menu items from Session Manager's Options menu:
Automatic Startup...
Menus...
Menu Bar...
Save Session Manager
You should also remove any other menu items that you don't 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 Session Manager's 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 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, you must delete or rename
the file VUE$PROFILE.VUE$DAT in the dedicated account's SYS$LOGIN
directory.
Chapter 14 Sharing Customization Files
As described in Part II, you can customize Session Manager and FileView
and save views you use frequently. When you customize Session Manager
and FileView, you create a private customization file
that your system reads every time you start an application.
You can share your custom file with other users. For example, you might
want to share a custom pull-down menu with other coworkers. When
several users share a public customization file, they
have access to a common custom file that can include custom menu items
or pull-down menus.
This chapter describes how to create and manage private, public, and
system customization files.
14.1 Using Shared Customization Files
When you start Session Manager or FileView, these applications read and
merge the contents of the customization files to create your
environment. First, they read the system customization file. The system
customization file shipped with DECwindows, contains definitions that
produce the menu bar, menu items, and saved views you saw when you
first started Session Manager or FileView. Next, they read the public
customization files, if any exist. The public customization file
contains any definitions that you share with other users, for example,
a shared pull-down menu. Finally, they read your private customization
file, which contains your personal definitions.
When Session Manager and FileView try to find the system customization
file, they look first in the location defined by the logical name
VUE$SYSTEM_PROFILE. If no translation is found, they use the file
specification DECW$SYSTEM_DEFAULTS:VUE$SYSTEM_PROFILE.VUE$DAT to locate
the system customization file. (The system customization file is placed
in the DECW$SYSTEM_DEFAULTS directory when you install DECwindows.)
When Session Manager and FileView try to locate the public
customization file, they look first in the location defined by the
logical name VUE$PUBLIC_PROFILE. You can equate this logical name with
a file specification to point to directories containing public
customization files. (VUE$PUBLIC_PROFILE can be a search list that
points to a list of directories containing customization files that you
share with other users.) If no translation is found, Session Manager
and FileView read all the files that match the file specification
VUE$LIBRARY:*.VUE$DAT. As the files are read, their specifications are
added to a list in memory. This ensures that no two files with the same
name are loaded.
Finally, Session Manager and FileView find your private customization
file by using the logical name VUE$PROFILE. You can equate this logical
name with a file specification to point to your private customization
file. If no translation is found, Session Manager and FileView use the
file specification DECW$USER_DEFAULTS:VUE$PROFILE.VUE$DAT. This
normally translates to your SYS$LOGIN directory, but you can redefine
it to translate to any other directory.
When you rearrange the order of menu items on a menu in a public
customization file or remove a built-in menu item from it, you create a
copy of that menu in your private customization file. Because Session
Manager and FileView read your private customization file last, any
subsequent changes made to the public customization file will not be
reflected in your private customization file. For example, if new menu
items are added to a menu in the public customization file, you will
not see those additions. Your private customization file will override
the public file. Adding additional menu items to a sorted menu does not
make a private copy of the public menu definition.
14.2 Creating Shared Customization Files
Session Manager and FileView read your private customization file by
translating the logical name VUE$PROFILE and reading all files with the
extension VUE$DAT. You can use the Create Public Profile File command
to create a file that contains customized Session Manager or FileView
components.
To build a public customization file that you can share with other
users:
- Add the Create Public Profile File command to a menu.
The
Create Public Profile File menu item does not appear on any of the
Session Manager or FileView menus by default. For more information
about adding menu items to pull-down menus, see Chapter 8.
- Choose Create Public Profile File from the menu.
When you
choose Create Public Profile File, you are prompted for a name for the
profile file. By default, the file extension is VUE$DAT. The profile
file that is created is placed in the directory pointed to by the
logical VUE$LIBRARY_WRITE. By default, VUE$LIBRARY_WRITE points to
SYS$COMMON:[VUE$LIBRARY.USER]. This default allows Session Manager
or FileView to merge your profile file automatically with the system
and user profile files. When Session Manager and FileView start, they
read all files with the extension VUE$DAT from the directory pointed to
by the logical VUE$PUBLIC_PROFILE. By default, the logical name
VUE$PUBLIC_PROFILE points to the same directories as VUE$LIBRARY_WRITE.
- After you fill in the profile file name, a new Fileview is created.
This FileView uses only the system definitions and does not have any of
your private definitions.
- Add any items you want to appear in the public profile file.
For more information about defining menu items or adding items to
menus, see Chapter 8. For more information about working with file
types and views, see Chapter 9.
Note
Any changes you make are saved in the new profile, so do not move the
FileView or Session Manager window or save settings in any built-in
dialog boxes. These settings will be saved in the public profile you
are creating.
|
If you are adding items to existing pull-down or pop-up menus,
using the Sort & Merge setting automatically merges your changes.
For more information about using the Sort & Merge setting, see
Chapter 8.
- When you finish making changes, exit the new FileView. The new
profile file is ready for you to use the next time you use Session
Manager or FileView. To see the new profile file, look in the directory
pointed to by VUE$LIBRARY_WRITE.
|