HP OpenVMS Systems

ask the wizard
Content starts here

help starting DECwindows apps at boot?

» close window

The Question is:

 
I am currently using AlphaStations 500 under OpenVMS 7.1, with DECwindows
Motif 1.2-4 and the New Desktop interface.
 
I would like to launch a graphical application (which needs DECwindows to be
started) on some of our stations, directly after system boot and without
prompting the user for username and password. I didn't find any way to start
DECwindows up, without displaying the login window.
 
Is there any 'autologin' feature in DECwindows startup, or is there any way
to enter a DECwindows session without actually logging in ?
 
Thanks for help and sorry for my english...
 
 


The Answer is :

 
[Motif] How To Automatically Start An Application At Boot Time
 
     Any party granted access to the following copyrighted information
     (protected under Federal Copyright Laws), pursuant to a duly executed
     Digital Service Agreement may, under the terms of such agreement copy
     all or selected portions of this information for internal use and
     distribution only. No other copying or distribution for any other
     purpose is authorized.
Copyright (c) Digital Equipment Corporation 1995.  All rights reserved.
 
PRODUCT:    DECwindows Motif[R] for OpenVMS, Versions 1.2, 1.2-3
            DECwindows Motif[R] for OpenVMS AXP, Version 1.1
            VMS DECwindows Motif[R], Versions 1.0, 1.0A, 1.1
 
OP/SYS:     OpenVMS VAX
            OpenVMS Alpha
 
COMPONENT:  Login
 
SOURCE:     Digital Equipment
 
 
OVERVIEW:
 
This article contains a procedure for automatically starting a
DECwindows application at boot time.
 
 
PROCEDURE:
 
An application can be started automatically at boot time by
performing the following steps:
 
1.  If necessary create an entry in the User Authorization File (UAF)
    for the username that will be used.
 
2.  While in the new account, from the Session Manager ensure that
    the desired application(s) are included in the Automatic Startup
    list.
 
3.  Create or edit the file SYS$MANAGER:DECW$SERVER_ACCESS_ALLOWED.DAT
    and add the following lines:
 
         LOCAL 0 SYSTEM   ALL
         LOCAL 0 username ALL
 
    NOTE:   Replace the 'username' field with the account created in
            step one.  Or to allow access for any account, an asterisk
            can be used.
 
4.  Create the following command procedure SYS$MANAGER:AUTOLOGIN.COM.
    The file has to allow for WORLD read and execute access (W:RE):
 
$!==========================
$! SYS$MANAGER:AUTOLOGIN.COM
$!==========================
$!
$! Check to see if the Batch Job is passing the "DETACH" Parameter
$! and make sure it's uppercase.  This way the detached job can run
$! and allow the Batch Job to exit rather than to stay executing in
$! the queue.
$!
$ if P1 .eqs. "DETACH" then goto DO_DETACH
$!
$! Wait a few seconds to make sure the Server Process is started or
$! reset and stable prior to attempting to connect.
$!
$ wait 00:00:15
$!
$! Define the Display logical to be used by this process from the
$! executive mode logical created in DECW$PRIVATE_APPS_SETUP.COM
$!
$ DEFINE DECW$DISPLAY TEST_DISPLAY
$!
$! Run the Session Manager Startup command file (or whatever you prefer).
$!
$ @SYS$MANAGER:DECW$STARTSM
$ EXIT
$!
$!
$! This is executed the first time through; invoked by the Batch Job.
$! This calls the same DCL Command file (AUTOLOGIN.COM) without a P1
$! resulting in the Session Manager application to start.
$!
$DO_DETACH:
$ RUN/DETACH SYS$SYSTEM:LOGINOUT -  ! Run as a detached process
 /INPUT=SYS$MANAGER:AUTOLOGIN.COM - ! Runs the AUTOLOGIN.COM file w/no P1
 /OUTPUT=AUTOLOGIN.LOG -            ! Outputs a log file for troubleshooting
 /AUTHORIZE                         ! /Authorize allows logicals definition
$ EXIT
 
5.  Edit the file SYS$MANAGER:DECW$PRIVATE_APPS_SETUP.COM.  If this
    file does not exist, copy the template file using the following
    DCL command:
 
         $ COPY SYS$MANAGER:DECW$PRIVATE_APPS_SETUP.TEMPLATE -
                SYS$MANAGER:*.COM
 
    Add the following lines to this file and place them between the
    "do_default:" label and the "exit" command.
 
    NOTE:  The logical name TEST_DISPLAY may be substituted with
           a logical name of choice.  However if you change the
           logical, be sure to change it in the AUTOLOGIN.COM
           file.
 
$ SET DISPLAY/CREATE/NODE=0/TRANSPORT=LOCAL/EXECUTIVE_MODE TEST_DISPLAY
$ DEFINE/SYSTEM/EXEC TEST_DISPLAY 'f$trnlnm("TEST_DISPLAY")
$ DEFINE/SYSTEM/EXEC DECW$LOGIN_NORESTART TRUE
$!
$! Be sure to submit the following job to a queue with a base priority
$! of 4.  Also, the parameter DETACH must be uppercase.
$!
$ DECW$MAINAPP == -
     "SUBMIT/USER=Username/NOPRINT SYS$MANAGER:AUTOLOGIN.COM/param=DETACH"
$!
$! The following line will force the Session Manager for the specified
$! username and it's autostart applications to start after an End
$! Session.
$!
$ DECW$SESSIONEND == "SUBMIT/NOPRINT SYS$MANAGER:AUTOLOGIN.COM/param=DETACH"
$!
$!
$! If you want the LOGIN BOX to display after an End Session, remove
$! the comment from the following line.  Then comment out the previous
$! DECW$SESSIONEND command:
$!
$! DECW$SESSIONEND == "MCR DECW$STARTLOGIN"
$!
$ EXIT
 
 
[R]  Motif is a registered trademark of the Open Software Foundation,
     Inc.

answer written or last revised on ( 23-APR-1998 )

» close window