How to set a fixed title for a terminal in Mac?
I am working a lot with terminals in a Mac with OS 10.13.6 and I want to set a title of a terminal (I have several terminal tabs open).
I know that I can select the tab, go to Shell
-> Edit Title
and set the title of the terminal.
However, when I - for example - run a command, login to some other computer etc. - that title is always overwritten.
How can I have a FIXED title for a Terminal Tab FOR ALL TIMES (except I turn off/reboot the laptop)?
Complete example so that my question is REALLY understood:
- I open a terminal in the Mac
- In the manu of the Terminal I select
Shell
->Edit Title
and change the title: - The title of the tab is like I want it:
- In that terminal I start
ipython
(AS AN EXAMPLE!!!). - The title has been changed. This NOT what I want!
- I still want the title to be 'Test Title'.
- Open the Preferences for terminal app
- Select the profile in use
- Select "tab" pane on the right
- Uncheck everything except Show activity indicator
Repeat the above for Window title if you want that to change in addition to the tab title. Now, you will only get the defaults when you make new tabs/windows and your manual changes will persist and not reflect the variables that endeavor to provide status each time the command line prompt is regenerated.
Most likely, the Terminal title is set in the PROMPT_COMMAND
variable that set in .bash_profile
For the location’ see Changing the Title of an SSH connection.
Just remove the ${HOSTNAME}
variable from the prompt on the remote machine’s ~/.bash_profile
You can go to preferences / profile / window and there is a text box for you to name the terminal window. There are also checkboxes underneath the text box to add other information to the name. There are similar options in iTerm2.