How to set terminal title on a profile?

Asked by Christopher Yeleighton on 2019-10-07

When I ask Terminal to launch a profile, a new window opens executing the profile. All such windows have window title "Terminal", which makes it hard to find the right window :-( How do I change the window title for a profile?

Question information

Language:
English Edit question
Status:
Expired
For:
Ubuntu gnome-terminal Edit question
Assignee:
No assignee Edit question
Last query:
2019-10-10
Last reply:
2019-10-26

Workaround:
Write a script to execute the command to be run in the profile.
Start the script with saying { echo "^[]0;$title^G"; } (where ^[ and ^G are control characters).

Add the setting for the PS1 variable in ~/.bashrc

You can make the prompt display lots of things and even have colours

The prompt is written by the interactive shell. When you run terminal with a profile that does not execute interactive shell, you do not get the prompt.

Launchpad Janitor (janitor) said : #4

This question was expired because it remained in the 'Open' state without activity for the last 15 days.