Uncategorized

Adding a title to SSH login terminal TAB

Introduction:
Reference: https://unix.stackexchange.com/questions/177572/how-to-rename-terminal-tab-title-in-gnome-terminal
Each terminal emulator has its own way of configuring a TAB title name for an SSH connection.
To make sure it works for all well behaving terminal emulators, you can force the Title via an escape sequence set in the destination server.

Howto:
Login to a server via SSH and ad one of the following lines at the end of the ~/.bashrc file of the user you are logging into.

printf "\e]2;YOUR TITLE GOES HERE\a"

or e.g. with bash:

PROMPT_COMMAND='echo -ne "\033]0;YOUR TITLE GOES HERE\007"'