customizing xterm windows

Does anyone now how to customize an xterm window in solaris to dynamically 'pwd' in the banner. I know how to launch with xterm -n 'cwd' but it does not change when I change dir's.

You could force the xterm to start in a particular directory by doing something like:

However, it does seem OK that you could do this:

Note: The -n switch sets the icon name but does not execute a shell command:

[Edited by Neo on 02-10-2001 at 04:06 PM]

I think the original poster wanted their xterm title bar to dynamically change according to the current working directory. This is possible using escape sequences, and has nothing to do with command line arguments. See <A HREF="How to change the title of an xterm">here</A> for a HOWTO on this subject.

Thanks Neo and PxT for your replies, it's greatly appreciated. I'll post what worked for me once I have it figured out.
Thanks again for your time.

This is what worked for me.

In my .cshrc file I added the following lines.
set system=`uname -n` # name of this system.
set myname=`/usr/ucb/whoami` # user name
set ip_addr=`ypmatch $system hosts` # IP address
set prompt="[$myname@($ip_addr)]$cwd-> " #command prompt.
alias cd 'cd \!* ; set prompt="[`whoami`@($ip_addr)]$cwd-> "; echo -n "2;`dirs`1;`dirs`"'

With a result of my command line looking like:
[username@(ip address nodename ]/home/username->

And the title of the xterm window dynamically changing to the dir I cd too.