🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.windows.x
Article #36838

Re: changing titles

#36838
From: David L. Battle
Date: Wed, 14 Feb 1990 15:15
33 lines
1433 bytes
Chris Keane writes:

> alias cd 'cd \!* ; echo ^[]2\;$HOSTNAME\:$cwd^G'
>
> which changes my window title to where ever I am, eg zeus:/system/usr/keane

Neat.  The only problem is that after you come back from an su, rlogin,
telnet, etc. session the title bar isn't updated.

I got a bit carried away and wanted to have the user name in the
title bar too since I have several user id's under which I do different
tasks.

Here's what I'm currently using (in my .cshrc):

setenv HOSTNAME `hostname`
setenv USERNAME `whoami`
alias tup 'echo -n ^[]2\;${USERNAME}@${HOSTNAME}:$cwd^G'
alias cd 'cd \!* ; tup'
alias telnet 'telnet \!* ; tup'
alias rlogin 'rlogin \!* ; tup'
alias dlogin 'dlogin \!* ; tup'
alias su 'su \!* ; tup'
tup

The "tup" at the end updates the title bar at login.

I didn't want to use the $USER variable because, at least under ultrix, when
one su's to root, $USER is still the user name you originally logged in under.


					-David L. Battle
					 battle@battle.esd.ornl.gov
Technical Details
Message-ID: <9002141515.AA12728@battle.ESD.ORNL.GOV>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!wuarchive!usc!snorkelwacker!bloom-beacon!BATTLE.ESD.ORNL.GOV!battlewr

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!wuarchive!usc!snorkelwacker!bloom-beacon!BATTLE.ESD.ORNL.GOV!battlewr
From: battlewr@BATTLE.ESD.ORNL.GOV (David L. Battle)
Newsgroups: comp.windows.x
Subject: Re: changing titles
Message-ID: <9002141515.AA12728@battle.ESD.ORNL.GOV>
Date: 14 Feb 90 15:15:52 GMT
Sender: daemon@athena.mit.edu (Mr Background)
Organization: The Internet
Lines: 33