KDE 4.X

Joseph Sinclair plug-discussion at stcaz.net
Tue Sep 8 20:39:35 MST 2009


Jerry Davis wrote:
> I wish the old konsole was back, I had a whole bunch of ssh terminals I went
> into and automatically renamed the terminal tab. now NO ONE seems to know how
> to do it - a LOT of ideas and theories on how it is supposed to -- but no one
> with knowledge of how to do it.
> 

You can get the title in Gnome Terminal switched by having the command set the title.  You just have to echo the correct escape sequence (this goes back to the old VT100 commandset).
A quick hack is to have a shell script that runs the ssh command set the prompt to the hostname, then run ssh, then set the prompt back (although the remote shell is perfectly capable of echoing the same escape sequence to change the title itself as well).
Here's an example script:
	#!/bin/bash
	echo -ne "\033]0;${1}@${2}\007"
	ssh ${1}@${2}
	echo -ne "\033]0;$(whoami)@$(hostname)\007"
the \033]0; and \007 pair are what set the terminal title.

You could even have the remote system do the reset by echoing the desired string in the .bashrc (check for an interactive terminal before doing that, though).


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: OpenPGP digital signature
Url : http://lists.PLUG.phoenix.az.us/pipermail/plug-discuss/attachments/20090908/a23ea739/attachment.pgp 


More information about the PLUG-discuss mailing list