Using Terminal, I want my tab titles to remain static!

Regardless of which box I SSH into!


How do I keep all these windows organized? Who knows what the box I'm logging into is going to do to my tab name or $PROMPT_COMMAND? I don't trust them, it needs to be statically configurable for specific intstances.


Any way to fix this?

MacBook Pro, Mac OS X (10.7.5)

Posted on Jan 3, 2013 2:07 PM

Reply
4 replies

Jan 3, 2013 4:15 PM in response to ZaPaDoS

To the best of my knowledge, this is 'ssh' changing the title when you first ssh into a remote system.

Then it is possible for the remote system to issue ecape sequences that change the title after you login, via the destinations account's shell initialization files.


If you control the destination system accounts, then put your own title escape sequence into the destination account's shell initialization file.


For example, if the destination system uses 'bash' as the shell, you could add the following to the .bash_profile


echo -ne "\e]0; Whatever you want in the Title \007"


If applications you run in the remote system also change the title, you can add the escape sequence to your remote prompt. Again for 'bash'


PS1="\[\e]0; Whatever you want in the Title \007\] your normal prompt> "


Besides that, I think your only other options are to either replace ssh with a version that does not change the title, or find an alternative terminal emulator that does not support changing the title.


iTerm has an iTerm -> Bookmarks -> Manage Profiles -> Terminal Profiles entry labeled "Keep default title with dynamic titles", but I'm not sure what that does, so you would have to experiment. <http://iTerm.sf.net>

Oct 21, 2014 4:39 PM in response to bforce1729

If you use iTerm 0.10 and check the iTerm -> Bookmarks -> Manage Profiles -> Terminal Profiles entry labeled "Keep default title with dynamic titles" option box, then the tab will not change.


However, iTerm 0.10 has not been updated in a long time. Then again it does work.


iTerm2 if a development fork, but it does not seem to have any options to lock the tab value.


I did not find anything for Applications -> Utilities -> Terminal.


Otherwise I do not think there is anything you can do to stop a remote system from changing your tab if the terminal emulator honors the title escape sequences.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Using Terminal, I want my tab titles to remain static!

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.