[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Setting window title in ssh'ed host
From: |
Gokdeniz Karadag |
Subject: |
Re: Setting window title in ssh'ed host |
Date: |
Fri, 07 Nov 2008 04:28:06 +0200 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; tr-TR; rv:1.8.1.16) Gecko/20080808 Thunderbird/2.0.0.16 Mnenhy/0.7.5.0 |
Hi, in your script, it would be better to revert it back to local hostname
after ssh finishes.
Both this and LocalCommand seems neat, too bad that I have solved it by
manually setting PS1 on all machines :)
------------------------------
Message: 5
Date: Thu, 06 Nov 2008 11:25:00 +0100
From: Malte Skoruppa <address@hidden>
Subject: Re: Setting window title in ssh'ed host
To: address@hidden
Message-ID: <address@hidden>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
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
- Re: Setting window title in ssh'ed host,
Gokdeniz Karadag <=