How to set terminal title on a profile?

Asked by Christopher Yeleighton

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:
Last reply:
Revision history for this message
Christopher Yeleighton (giecrilj) said :
#1

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).

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#2

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

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

Revision history for this message
Christopher Yeleighton (giecrilj) said :
#3

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.

Revision history for this message
Launchpad Janitor (janitor) said :
#4

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