🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.windows.x.apps
9 messages
9 total messages Started by Mike Schwager Thu, 21 Jan 1993 15:59
Setting icon title for an xterm
#686
Author: Mike Schwager
Date: Thu, 21 Jan 1993 15:59
12 lines
1032 bytes
Ladees and Germs,
How would I set the icon title for an xterm, from that xterm.  I already
know how to reset the titlebar title, but I forgot where I got that
information from.... if you could point me to where you got your info from,
that would be appreciated.  I tried to do a man xterm to no avail.  Thanks!
-Mike Schwager
-Mike
aka, Mike Schwager               |"I will never apologize for the United States
INTERNET:schwager@cs.uiuc.edu    | of America, ever.  I don't care what the
Bye, George!!!                   | facts are."  -George Bush
University of Illinois, Dept. of Comp. Sci., for whom I do not speak
Re: Setting icon title for an xterm
#688
Author: Bob Haar
Date: Thu, 21 Jan 1993 17:47
18 lines
1212 bytes
In article Hq2@cs.uiuc.edu, schwager@mike.cs.uiuc.edu (Mike Schwager) writes:
|>
|>Ladees and Germs,
|>How would I set the icon title for an xterm, from that xterm.  I already
|>know how to reset the titlebar title, but I forgot where I got that
|>information from.... if you could point me to where you got your info from,
|>that would be appreciated.  I tried to do a man xterm to no avail.  Thanks!

One way is with the -n option as in:

	xterm -T <titlebar string> -n <icon name string> 


---
  	Robert Haar               InterNet : rhaar@gmr.com 
	Computer Science Dept., G.M. Research Laboratories
DISCLAIMER: Unless indicated otherwise, everything in this note is
personal opinion, not an official statement of General Motors Corp.
Re: Setting icon title for an xterm
#693
Author: Paul E. Rensing
Date: Thu, 21 Jan 1993 21:46
18 lines
1148 bytes
I have a small script which you run from inside an xterm which changes it's
name in the window title bar and on the icon. I got the escape codes need
from the file ctlseqs.ms which came with the xterm source. Hope this  is
useful.
		Paul Rensing

------- script xtermname :
#!/bin/csh
# change the name of an xterm to the first argument.
# run this in the xterm whose name you want to change

echo "]0;"$1""
--
Paul Rensing
Home: (415) 327-3751
Work: (415) 926-3593
rensing@unixhub.slac.stanford.edu
Re: Setting icon title for an xterm
#699
Author: Jerry Kearns
Date: Thu, 21 Jan 1993 23:43
26 lines
1482 bytes
In article <SMITH.93Jan22090752@wilton.anu.edu.au>, smith@pell.anu.edu.au (Michael Smith) writes:
|> Mike Schwager writes:
|> > How would I set the icon title for an xterm, from that xterm.
|> 
|> try defining this alias in your .cshrc file:
|> 
|> 	alias nameme 'echo -n "]2;\!:1]1;\!:2"'
|> 
|> where the two "^[" are ESCape characters, and the two "^G" are control-G
|> characters (if using emacs, type control-q before the escape and control-G
|> characters; if typing this straight into xterm window use control-v instead
|> of control-q).
|> 
|> To rename your xterm, just type    
|> 
|> 	nameme "title name" "icon name"
|> 
|> Cheers,
|> Michael.
|> --
|> ----------------------------/|-|--|-|--|------Michael-Smith-------------------
|> smith@pell.anu.edu.au      /_| |\ | |  |      Mathematics Research Section
|> --------------------------/--|-|-\|-|_/|------Australian-National-University--

This seems to work for me in csh, but not ksh.  What am I doing wrong?
Jerry
Re: Setting icon title for an xterm
#700
Author: Andy.Behrens
Date: Thu, 21 Jan 1993 23:44
33 lines
1224 bytes
schwager@mike.cs.uiuc.edu (Mike Schwager) writes:
> How would I set the icon title for an xterm, from that xterm.  I already
> know how to reset the titlebar title ...

The following script lets you change the titlebar, the icon name, or
(the default behavior) both at once.

Examples:
	titlebar New Name
	titlebar -n New IconName
	titlebar -T New Title

============================== CUT HERE ==============================
#! /bin/sh

# titlebar - sets titlebar and icon name

param=0

esc=` echo X | tr X '\033' `
bel=` echo X | tr X '\007' `

case "$1" in
  -n | -icon[nN]ame)
		param=1; shift ;;
  -T | -title)
		param=2; shift ;;
  -*)
		echo >&2 'usage: titlebar [-T | -n] text'; exit 1 ;;
esac

echo "${esc}]${param};$*${bel}"
============================== CUT HERE ==============================
Re: Setting icon title for an xterm
#694
Author: Michael Smith
Date: Fri, 22 Jan 1993 09:07
22 lines
1250 bytes
Mike Schwager writes:
> How would I set the icon title for an xterm, from that xterm.

try defining this alias in your .cshrc file:

	alias nameme 'echo -n "]2;\!:1]1;\!:2"'

where the two "^[" are ESCape characters, and the two "^G" are control-G
characters (if using emacs, type control-q before the escape and control-G
characters; if typing this straight into xterm window use control-v instead
of control-q).

To rename your xterm, just type    

	nameme "title name" "icon name"

Cheers,
Michael.
--
----------------------------/|-|--|-|--|------Michael-Smith-------------------
smith@pell.anu.edu.au      /_| |\ | |  |      Mathematics Research Section
--------------------------/--|-|-\|-|_/|------Australian-National-University--
Re: Setting icon title for an xterm
#715
Author: Andrew Joyner
Date: Sun, 24 Jan 1993 23:18
30 lines
1879 bytes
In article <C17oFA.Hq2@cs.uiuc.edu>, schwager@mike.cs.uiuc.edu (Mike Schwager) writes:
|> 
|> Ladees and Germs,
|> How would I set the icon title for an xterm, from that xterm.  I already
|> know how to reset the titlebar title, but I forgot where I got that
|> information from.... if you could point me to where you got your info from,
|> that would be appreciated.  I tried to do a man xterm to no avail.  Thanks!
|> -Mike Schwager
|> -Mike
|> aka, Mike Schwager               |"I will never apologize for the United States
|> INTERNET:schwager@cs.uiuc.edu    | of America, ever.  I don't care what the
|> Bye, George!!!                   | facts are."  -George Bush
|> University of Illinois, Dept. of Comp. Sci., for whom I do not speak
|> 

One way to do it dynamically is...

echo "^[]2;string^G	# to set the xterm title bar, and...
echo "^[]1;string^G	# to set the icon name.

where ^[ is escape and ^G is ctrl-G. You can of course use this inside
scripts etc. You can also alias 'cd' to change the title bar to the
current working directory etc. 101 uses.

-- 
Andrew Joyner   [andrewj@tplrd.tpl.oz.au] | luffness (n): Hearty feeling that
Hardware Design Engineer, R&D Elec Eng.   | comes from walking on the moors
Telectronics Pacing Systems, Lane Cove NSW| with gumboots and cold ears. \\\
Australia       v:+61 2 413-6939  f:-6060 | -+- Erupting Bus-Driver Inc. -+-
Re: Setting icon title for an xterm
#716
Author: Grant Totten
Date: Mon, 25 Jan 1993 14:07
13 lines
1157 bytes
That's great if you use xterms.  How would I go about deciding if the
user us running xterm or dxterm and sending the appropriate escape
codes to set the title bar?

Grant

Grant Totten, Programmer/Analyst, Trent University, Peterborough Ontario
GTotten@TrentU.CA            Phone: (705) 748-1653   FAX: (705) 748-1246
========================================================================
At the source of every error which is blamed on the computer you will
find at least two human errors, including the error of blaming it on
the computer.
Re: Setting icon title for an xterm
#731
Author: Philip Muench
Date: Fri, 29 Jan 1993 04:01
31 lines
1724 bytes
In article <C189wo.3HG@SSD.intel.com> jkearns@ssd.intel.com (Jerry Kearns) writes:
>In article <SMITH.93Jan22090752@wilton.anu.edu.au>, smith@pell.anu.edu.au (Michael Smith) writes:
>|> Mike Schwager writes:
>|> > How would I set the icon title for an xterm, from that xterm.
>|> 
>|> try defining this alias in your .cshrc file:
>|> 
>|> 	alias nameme 'echo -n "]2;\!:1]1;\!:2"'
>|> 
>|> where the two "^[" are ESCape characters, and the two "^G" are control-G
>|> characters (if using emacs, type control-q before the escape and control-G
>|> characters; if typing this straight into xterm window use control-v instead
>|> of control-q).
>|> 
>|> To rename your xterm, just type    
>|> 
>|> 	nameme "title name" "icon name"
>|> 
>|> Cheers,
>|> Michael.
>|> --
>|> ----------------------------/|-|--|-|--|------Michael-Smith-------------------
>|> smith@pell.anu.edu.au      /_| |\ | |  |      Mathematics Research Section
>|> --------------------------/--|-|-\|-|_/|------Australian-National-University--
>
>This seems to work for me in csh, but not ksh.  What am I doing wrong?
>Jerry

   Remember the "alias" command in ksh has an "=" between the name and
the definition.
-Philip Muench
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads