Hi,
I solved the problem in bash by editing my ~/.profile file:
ssh() {
args=$@
echo -ne "\033k${args##* }\033\\";
/usr/bin/ssh "$@";
}
It"s a rather simple script, whenever you call ssh, first this script is
executed, which calls the real ssh in the end, with the same arguments.
Before it does that, however, it sets the screen title to the last
argument of the ssh command. Usually, this is the hostname, at least for
the way I enter commands ;-)
Malte
Robin Lee Powell schrieb:
On Wed, Nov 05, 2008 at 10:50:31PM -0800, Micah Cowan wrote:
I don't really see how that does what the thread's talking about;
namely, set the window title to the hostname that's connected by
ssh.
You set your remote shell's PS1 to tell screen to set the title to
$(uname -n) or whatever.
As previously mentioned in these threads (IIRC?), the problem with
prompt hacks is you don't always have control over the prompts in
remote shells (and even when you do, it's a bit of a pain to set
up in every host you ever visit).
True enough. The LocalCommand hack is kinda neat.
-Robin
_______________________________________________
screen-users mailing list
screen-users@gnu.org
http://lists.gnu.org/mailman/listinfo/screen-users