Place servername in TAB iTerm

Bertram Scharpf lists at bertram-scharpf.de
Tue Dec 22 18:28:10 UTC 2015


Hi,

On Tuesday, 22. Dec 2015, 13:39:33 +0100, Matthias Apitz wrote:
> El día Tuesday, December 22, 2015 a las 01:34:01PM +0100, Johan Hendriks escribió:
> > How can I change the name off the TAB in iTerm (and other terminal
> > programs) to show the servername.
> 
> I can only speak for xterm and urxvt terminals [...]
> 
>   printf "\033]0;$1\007"

By the way, if you run that inside a terminal multiplexer
(tmux here) it will modify the pane title inside the
terminal. At least tmux will not forward it to the terminal
emulator.

Yet, it is still possible to modify the window title. Find
out the tty number of the multiplexer client and send the
escape sequence there.

  $ ps -l | grep tmux
  $ printf "\033]0;$1\007" >/dev/pts/2

Replace "2" by the value of the first command's "tt" field.

Bertram


-- 
Bertram Scharpf
Stuttgart, Deutschland/Germany
http://www.bertram-scharpf.de


More information about the freebsd-questions mailing list