[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Dynamic Title
From: |
Asif Iqbal |
Subject: |
Re: Dynamic Title |
Date: |
Tue, 2 Jun 2009 17:47:02 -0400 |
On Tue, Jun 2, 2009 at 5:36 PM, Dan Mahoney, System Admin
<address@hidden> wrote:
> On Tue, 2 Jun 2009, Asif Iqbal wrote:
>
>> On Tue, Jun 2, 2009 at 5:07 PM, Dan Mahoney, System Admin
>> <address@hidden> wrote:
>>>
>>> On Tue, 2 Jun 2009, Asif Iqbal wrote:
>>>
>>>> On Tue, Jun 2, 2009 at 4:44 PM, Dan Mahoney, System Admin
>>>> <address@hidden> wrote:
>>>>>
>>>>> On Tue, 2 Jun 2009, Asif Iqbal wrote:
>>>>>
>>>>>> This is what I have done on the screen server to achieve dynamic
>>>>>> title.
>>>>>>
>>>>>> in .bashrc :
>>>>>>
>>>>>> PROMPT_COMMAND='if [ $TERM = "screen" ]; then printf
>>>>>> "\033k${HOSTNAME%%.*}\033\\" ; fi'
>>>>>>
>>>>>> in .ssh/config :
>>>>>> # this won't work unless your screen server has openssh 5.1 or above
>>>>>> host *
>>>>>> PermitLocalCommand yes
>>>>>> LocalCommand /path/to/screen_ssh.sh %n
>>>>>>
>>>>>>
>>>>>> in screen_ssh.sh :
>>>>>> # got the idea from http://www.tenshu.net/screen_ssh/
>>>>>
>>>>> Why would you tie this to your ssh command at all?
>>>>>
>>>>> I have a postcmd in my shell like this (this is tcsh):
>>>>>
>>>>> alias postcmd 'printf "\033%s%s %s %s\033\\" "k" "\!#:0" "\!#:$"
>>>>> "[$HOST]"'
>>>>
>>>> You need to create that alias on every hosts. I have 300 of them.
>>>
>>> Nope, just the one I ssh out from. I ssh into about as many hosts as you
>>> do, but only one or two "home" servers (where my keys live, etc).
>>>
>>> Better put, your shell only needs to be modified on machines you run
>>> "screen" on.
>>>
>>
>> with your setup when you ssh to a host it changes the title fine, but
>> when exit from it
>> the title does not change back.
>
> Yes, when I exit from it, it changes back because my prompt on my main
> machine is set thusly:
>
> set prompt="%{\ektsch [$HOST]\e\\%}"\%
>
Ok it is more than just postcmd. Let me know if you can make it work
for bash users.
I dont use tcsh
> -Dan
>
> --
>
> "Don't be so depressed dear."
>
> "I have no endorphins, what am I supposed to do?"
>
> -DM and SK, February 10th, 1999
>
> --------Dan Mahoney--------
> Techie, Sysadmin, WebGeek
> Gushi on efnet/undernet IRC
> ICQ: 13735144 AIM: LarpGM
> Site: http://www.gushi.org
> ---------------------------
>
--
Asif Iqbal
PGP Key: 0xE62693C5 KeyServer: pgp.mit.edu
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
- Re: Dynamic Title, Michael Grant, 2009/06/01
- Re: Dynamic Title, Asif Iqbal, 2009/06/02
- Re: Dynamic Title, Dan Mahoney, System Admin, 2009/06/02
- Re: Dynamic Title, Asif Iqbal, 2009/06/02
- Re: Dynamic Title, Dan Mahoney, System Admin, 2009/06/02
- Re: Dynamic Title, Asif Iqbal, 2009/06/02
- Re: Dynamic Title, Dan Mahoney, System Admin, 2009/06/02
- Re: Dynamic Title,
Asif Iqbal <=
- Re: Dynamic Title, Brian Kroth, 2009/06/03
- Re: Dynamic Title, Asif Iqbal, 2009/06/03
- Re: Dynamic Title, Leen Smit, 2009/06/09
- Re: Dynamic Title, Brian Kroth, 2009/06/17