Article 147827 of comp.os.vms:
Rick Beldin writes:

> Nicholas Young (youngn@logica.com) wrote:
> 
> 	It is not a rumor - I believe it can be done.  I used to work for DEC - 
> 	in the support arena, and this was a very common question.  If I recall
> 	correctly, the escape sequence was an OSC ("esc[") something or
> 	other.  It was documented in the DECterm User's Guide - a small
> 	manual that very few customers got for some reason.   DEC's support
> 	staff should be able to give it to you...  It is also documented in
> 	the VWS (Vax Workstation Software) manual set.  For those that
> 	didn't know what that was, it was a proprietary pre-cursor to X
> 	that ran only on VAX workstations.  Look for some old orange manuals
> 	in your storage closet... ;-)
> 
> 	You could also do stuff like iconify windows with the escape
> 	sequence, change the size, title and icon. 
> 
> 	You might want to try the following, which is the escape sequence
> 	that CDE uses - I don't know if it is similar, but it might be....
> 
> 	\033]0;My Title\007\c
> 
> 	(this from a Unix script)...

Here is a dcl script for both title and icon on decterms....
Simply call it from your login.com file. It will determine if the device is
X-capable and if so...set the name to (user)::node (not the usual format which
is why I wrote the com file..

!
$! Setup the interactive terminal / window settings
$!
$ myterm = f$getjpi("","terminal")
$ dev = f$getdvi("''myterm'","tt_phydevnam")
$ port = f$getdvi("''dev'","tt_accpornam")
$ check_port = f$extract(0,5,port)
$ if F$GETDVI("SYS$COMMAND:","MBX") then goto EXIT
$ if f$getdvi("sys$output:","trm")
$ then
$    devnam = f$extract(0,2,f$getdvi("sys$output:","devnam")-"_"-"_")
$    if .not. f$getdvi("sys$output:","tt_deccrt3")
$    then
$        if devnam.eqs."RT" then goto skip_inquire
$        if devnam.eqs."WT" then goto skip_inquire
$        if devnam.eqs."FT" then goto skip_inquire
$        if devnam.eqs."TW" then goto skip_inquire
$        if devnam.eqs."VT" then goto skip_inquire
$        if  (devnam .eqs. "LT") .and. (check_port .eqs. "MDWTS") then goto EXI
$        set terminal sys$output:/inquire
$    endif
$skip_inquire:
$    set term/broad
$    set broadcast=all
$    if      (devnam .eqs. "TW") -
        .or. (devnam .eqs. "FT") -
        .or. (devnam .eqs. "VT") -
        .or. (devnam .eqs. "RT") -
        .or. (devnam .eqs. "LT")
$       then
$          OSC[0,8] = 157
$          ST[0,8] = 156
$          BANNER = F$FAO("!AS!AS", F$LOGICAL("SYS$NODE")- "_" , F$USER())
$          ICON = F$FAO("!AS!AS", F$USER() + "::", F$LOGICAL("SYS$NODE")- "_" -
$          DECTERM_HEADERS = "''OSC'21;''ICON'''ST'''OSC'2L;''ICON'''ST'"
$          WRITE SYS$OUTPUT DECTERM_HEADERS
$       endif
$ endif
$ EXIT 1
$ EXIT:
$exit

---------------------------------end---------------------------------------

Regards,

Jim Jennis, Systems & Network Mgr.
3M Corp.
Printing & Publishing Systems Div.
Middleway, WV. USA.
Internet: jhjennis2@mmm.com

Opinions expressed herein are my own and may not represent those of my employer.


