Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 05 May 2010 09:53:59 +1200
From:      James Butler <sweetnavelorange@gmail.com>
To:        Alex Huth <a.huth@tmr.net>
Cc:        freebsd-gnome@freebsd.org
Subject:   Re: tiel xterm in ssh sessions
Message-ID:  <4BE09777.2070008@gmail.com>
In-Reply-To: <1272981632.1483.17.camel@borusse.ewmr.base>
References:  <1272981632.1483.17.camel@borusse.ewmr.base>

next in thread | previous in thread | raw e-mail | index | archive | help
On 05/05/10 02:00, Alex Huth wrote:
> Hello!
>
> IŽd like to set the titel of a gnome-terminal dynamic, even when it is a
> ssh session. For the "normal" local session i use the following:
>
> ---------------
> if echo $TERM | egrep -iq 'xterm|vt100'; then
>          PS1='\[\033]0;\h:\w\$\007\]'$PS1
> fi
> --------------
>
> But how can i do that for ssh sessions, with the name of the remote
> host?

I can think of two ways:
a) make sure you have something similar to the above in the shell rc 
file on each remote host, or
b) use something like this on the local host:

ssh() {
	_ssh="/usr/bin/ssh"
	printf "\033]0;$*\007"
	$_ssh $*
}

-James

>
> Thanks in advance
>
> Alex
>
>
> _______________________________________________
> freebsd-gnome@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-gnome
> To unsubscribe, send any mail to "freebsd-gnome-unsubscribe@freebsd.org"




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4BE09777.2070008>