Putty title changes after login

The easier answer to this question is two configuration changes in your Putty preferences for the session(s):

  1. In Window -> Behaviour set your desired Window title.

  2. In Terminal -> Features check Disable remote-controlled window title changing.


It's most likely updated by your shell prompt ($PS1 in ~/.bashrc or the system-wide /etc/bash.bashrc). Look for \e]2; or \033]2; or a similar escape sequence.

Your given example looks like the usual "<user>@<host>:<path>" template, in which domU-12-31-20-0a-81-AB is the server's hostname as currently configured in the kernel. Most likely, it was assigned by an automated Xen domU creation tool based on your virtual server's Ethernet address.

You can change the current hostname by using hostname newname. To make it persist across reboots, look around in /etc – on every reboot, the hostname is read from the file /etc/hostname (other distributions may use /etc/sysconfig/hostname or similar).


An exert from the /etc/bash.bashrc file is to run the following line to fix your title back to the default:

echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD}\007"

Tags:

Ssh

Putty