I'd like to set the terminal title to user@host so I can easily tell which machine I'm connected to from the window title. Is there a way to do this from SSH or from GNOME Terminal?
|
|
||||
|
|
|
Yes. Here's an example for bash using PS1 that should be distro-agnostic: Specifically, the escape sequence
Also note that there can be many ways of setting an xterm's title, depending on which terminal program you are using, and which shell. For example, if you're using KDE's Konsole, you can override the title setting by going to
Additionally, you may want to check out:
|
|||||||||||||
|
|
Here's a version of the SSH bash script that I use which sets the remote server's title and command prompt without making any changes to the remote server.
You can invoke it by calling ./my_ssh.sh username hostname |
|||
|
|
