What I do, is I use tcsh and have the following line in my .cshrc file: if ($?TERM && ($TERM == "xterm" || $TERM == "screen" || $TERM == "rxvt")) then alias cwdcmd 'echo -n "]2;"/[EMAIL PROTECTED]"$cwd]1;"{$HOST}""' cwdcmd endif
Note that those control characters go like this: "ESC]2;" "$cwd^GESC]1;" "^G" in case they don't make it through the email... cwdcmd is a command that tcsh runs each time you change directories. You should be able to work the tty in there too, since tcsh stores the tty as "$tty". This produces a titlebar (this works in PuTTY too) like (e.g.) this: /[EMAIL PROTECTED]/etc/sysconfig/network-scripts Hope this helps. Eric (screen user since late 80's!) Peter Beckman <[EMAIL PROTECTED]> writes: > I know it has been discussed many-a-time before (I've read the July 2004 > thread in the archives), but I wanted to bring it up again to see if there > was any more movement within the development on it. > > Jason White made a patch to 4.0.2 that creates %T asan escape code that > will echo the TTY. Nice. I'd love nothing more than to patch my code > on all of my servers! > > So, I've spend the last 2 hours (instead of patching screen) trying to > figure out a way to set up the windowlist or window title to show the TTY > and/or the current working directory for that screen window. > > I thought about writing the tty to a file and have a backtick command read > it, but then how to determine which file goes with which screen, and > furthermore how to determine if it is a single or multiple files! Too bad > I couldn't do something like this: > > backtick 1 5 5 cat ~/.screen/win.$WINDOW.pwd > backtick 2 5 5 cat ~/.screen/win.$WINDOW.tty > > because I could write those files every time a new window was created... > > I know I can use the escape codes in my prompt and put $TTY in there, but > then my prompt doesn't auto-update the command being run. > > Any ideas that aren't as much as a hack? > > Beckman > --------------------------------------------------------------------------- > Peter Beckman Internet Guy > [EMAIL PROTECTED] http://www.purplecow.com/ > --------------------------------------------------------------------------- > > > _______________________________________________ > screen-users mailing list > screen-users@gnu.org > http://lists.gnu.org/mailman/listinfo/screen-users _______________________________________________ screen-users mailing list screen-users@gnu.org http://lists.gnu.org/mailman/listinfo/screen-users