Question: how to change the name of xterm?
Answer: To assign a unique name to an xterm, use the -T switch. To assign a unique name when minimized, use the -n switch. The bash shell uses the PROMPT_COMMAND variable to set the title, iconified and shell prompt.