Relates-to-subject: "Automatically starting a process at boot time" I wrote: >You can "log in" a terminal completely automatically by using >SYS$CREPRC with NOPASSWORD and INTERACTIVE as the "flags" argument - >that's how e.g. DECWINDOWS terminals get created "logged in". > >As far as I can see, these options are not available from RUN/DETACH, >so a little program is required, available upon request. Due to popular demand, the (small, trivial) program LOGINTERM follows below. I have been using it for local terminals and OPA0; it also works for dedicated LAT terminals (with Access=Remote set in the server). My usage so far has been to log in rather privileged users, so the program itself requires DETACH privilege; access rights to the terminal involved will always be required. I'm not sure if run/detached (i.e. the PRC$M_DETACH flag) would work - this way you might not require DETACH privilege. Access to a terminal normally requires SYSPRV, unless SET PROTECTION/DEVICE has been used. Warning: prior to invocation of LOGINTERM, make sure that the user is not already logged in. Otherwise LOGINTERM *will* work and login the user a second time on the same terminal, with rather strange terminal behaviour. Hint: the user's LOGIN.COM can find out that it has been autologged this way - see F$GETJPI(...,"Creprc_Flags"). I haven't used it, though. ------ excerpt from SYSTARTUP_V5.COM (or even non-_V5) -------------- $ set prot=(O=rwlp,S=rwlp)/device/owner=OPERATOR CONSOL: ... $ submit/user=OPERATOR STARTOPER.BAT !the user mentioned here will be logged in $! !no other way to specify user name (!) ------------------------------------------------------ ------ STARTOPER.BAT goes like ... ------------------- $ wait 0:0:30 ! must be enough to have logins enabled by then $! ! if CONSOL: is OPA0:, wait long enough for SYSTARTUP to finish! $! $ allocate CONSOL: ! test if in use $ if .not.$status then exit ! don't want to login if already in use $ deallocate CONSOL: $! $ set process/priv=DETACH $ mcr SYS$LOGIN:LOGINTERM CONSOL: ! ... or wherever this program resides -------------------------------------------------------------------- --- LOGINTERM.MAR (the program you've been asking for) ------------- .title loginterm create an interactive process w/o user prompt ; with same username as caller. ; ; w.j.m. 15-oct-1987 (VMS V4.5) ; ; privileges required: ; - DETACH required by caller ; - access to terminal by uaf default privilege ; $prcdef $dvidef ; image: .ascid "SYS$SYSTEM:LOGINOUT.EXE" input_b: .blkb 32 input: .long 32,input_b inputprompt: .ascid "Terminal: " devnam_b: .blkb 32 devnam: .long 32,devnam_b priv: .long -1,-1 ; dvicode2: .long dvi$_devnam ; ;***** ; .entry begin,^m<> ; pushaw input ;ask for terminal name pushaq inputprompt pushaq input calls #3,g^lib$get_foreign blbs r0,11$ ret 11$: pushaw devnam ;better use physical device name pushaq devnam clrl -(sp) pushaq input clrl -(sp) pushal dvicode2 calls #6,g^lib$getdvi blbs r0,12$ ret 12$: $creprc_s - ;do the real work image=image,- input=devnam,- output=devnam,- error=devnam,- prvadr=priv,- prcnam=input,- baspri=#4,- uic=#^x00010004,- stsflg=# ret ; .end begin --- end of LOGINTERM.MAR ---------------------------- Enjoy, Wolfgang J. Moeller, GWDG, D-3400 Goettingen, F.R.Germany | Disclaimer ... Bitnet/Earn: U0012@DGOGWDG5 Phone: +49 551 201516 | No claim intended! Internet: Moeller@gwdgv1.dnet.gwdg.de | This space intentionally left blank.