Xshell Forum

hostname displayed in tab name automatically

Last post: Tuesday, May 31, 2016 3:36 PM by Support, 1 reply

 
Thursday, May 26, 2016 3:43 PM - Chris

hostname displayed in tab name automatically

 
Hello,

I'm using the home/school version of the XShell application and I've seen a few forum threads here and there regarding this topic that have not shown any updates in some time.

I wanted to know if the ability to have the tabs auto-update the hostname of the server that I am logged in to will be made available (again?)?

The majority of the work I do is through access servers into labs and test environments and it's easy to lose track of which server I am remoted into from or to home as well as at school.

It is pretty easy to accidentally paste scripting, commands, or code into the wrong ssh session and I don't want to break anything if I can avoid it.

I'm using the 2016 version of XShell 5 Build 0977

Thank you,

Chris

Program Ver. : Xshell 5
Tuesday, May 31, 2016 3:36 PM - Support

Re: hostname displayed in tab name automatically

 
The prompt command function of linux may be helpful for this case. By using the Prompt Command, the terminal emulator can display any string in its title bar. In Xshell, it can be shown in the title bare and in the tab name.

1. Change the tab option to Show Terminal Title from the tab's context menu.
2. Configure your PROMPT_COMMAND variable as desired.

e.g. export PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME%%.*}: ${PWD/#$HOME/~}"; echo -ne "\007"'

Certain shells do not support this feature.

Technical Support

Like us on Facebook
Follow us on Twitter
Visit our blog Blog