SUMMARY: Q: how to change Dtterm title ?
I got several responses, each with a different flavor.
Many thanks to:
Gene C Van Nostern-EDS
Simon Tardell
Rocco Scavetta
Mikel Stous
Pirie Hart
and others (... having some trouble with mail - may have lost some)
Their resposes are below.
I combined them for a solution that works for me (ksh script):
#ksh cwt 23.mar.1997 rnf
echo "enter window-icon name <return=hostname> "
read name
if test -z "$name"
then
name=$(hostname)
fi
echo "^[]0;$name^G"
# ^[ is entered as ctrl v ctrl [ and ^G is entered as ctrl v ctrl G
=============================================================================
From: ICDC::SMTP%"gene_at_sherpa.COM" "Gene C Van Nostern-EDS x4717" 21-MAR-1997 09:21:04.85
Subj: RE: Q: how to change Dtterm title ?
Frank,
I'm kinda guessing at DECterm windows, as I use xterm exclusively.
If DECterms work like xterms, you can set the title by echoing:
<ESC>]0;TITLE<Ctrl-G>
in the shell. (<ESC> and <Ctrl-G> are replaced by the literal
characters, naturally.) If you use csh/tcsh, you can use an alias, like
I do:
alias xtitle 'echo "^[]0;\!*^G"'
You can get the <ESC> and <Ctrl-G> into your .cshrc by using <Ctrl-V> in
vi, or <Ctrl-Q> in emacs.
Hope this helps,
Gene.
###################################################
>
From: MAIL::SMTP%"tardell_at_particle.kth.SE" "Simon Tardell" 21-MAR-1997 09:22:31.89
Subj: RE: Q: how to change Dtterm title ?
tiny difference
#!/bin/csh -f
#
# Usage: title "IconName" "WindowTitle"
# Sets icon name and window title of dtterm
set OSC="^[]"
set ST="^[\"
echo -n $OSC"2L"$1$ST
echo -n $OSC"2l"$2$ST
Simon Tardell, voice +46 8 162688 fax +46 8 347817
Fysikum, Stockholms universitet simon_at_physto.se, tardell_at_particle.kth.se
###################################################
From: MAIL::SMTP%"rocco_at_zk3.dec.COM" "Rocco Scavetta" 21-MAR-1997 11:15:12.84
Subj: RE: Q: how to change Dtterm title ?
Hi Frank,
Using the Korn shell the following works for me:
print -n "^[]O21;${STR}^[\^[]O2L;${HOST}:${STR} ^[\\"
where:
${STR} is an env veriable init'd to whatever you want.
${HOST} is an env variable containg the host name
There are two esc seq in the string the first esc seq sets
the title and the second esc seq set the icon text. good luck.
--
Rocco C. Scavetta If you stew cranberries like apples,
Unix Development - AdvFS they taste much more like prunes
Digital Equipment Corp. than rhubarb ever did.
rocco_at_zk3.dec.com - Captain Spaulding
###################################################
From: MAIL::SMTP%"stous_at_ctr.cstp.umkc.EDU" "Mikel Stous" 21-MAR-1997 12:13:10.76
Subj: RE: Q: how to change Dtterm title ?
I use:
dxterm -ls -xrm DXterm.title:Zeus -xrm DXterm.iconName:Zeus -e rsh Zeus
to login to "zeus", on of our servers.
Mikel
###################################################
From: MAIL::SMTP%"pirie_at_u.washington.EDU" "Pirie Hart" 21-MAR-1997 12:52:16.10
Subj: RE: Q: how to change Dtterm title ?
I have the following text in my .login file. See how it works for you:
# Awkward procedure to avoid setting window name to "'`hostname`'"
# when using cat, more, nl, ... to display the contents of .login.
echo 'ESC]21;'`hostname`'ESC\' | sed -e "s/ESC/^[/g"
echo 'ESC]2L;'`hostname`'ESC\' | sed -e "s/ESC/^[/g"
You will change "`hostname`" to be whatever you want to be your window title.
-----------------------------------------------------------------------
Pirie Hart, Ph.D. Univ. of Washington, Box 359931
Systems Administrator Center for AIDS and
Telephone: (206) 720-4312 Sexually Transmitted Diseases
Facsimile: (206) 720-4209 1001 Broadway, Suite 215
Internet: pirie_at_u.washington.edu Seattle, WA 98122-4304
-----------------------------------------------------------------------
Received on Sat Mar 22 1997 - 01:26:05 NZST