"gnome-terminal --title=.." doesn't work

Asked by Sergey Pashinin on 2012-09-09

I have new 12.04.1 Ubuntu.

when I type " gnome-terminal --title="SOME TITLE HERE" " new terminal runs and I can even see my title for half a second, then it becames the default one (user@host:dir)

This bug(?) was discussed here: http://unix.stackexchange.com/questions/24734/how-can-i-launch-gnome-terminal-with-unique-titles-for-multiple-tabs

so if comment "PS1" in .bashrc - "gnome-terminal --title.." works:

case "$TERM" in
xterm*|rxvt*)
    #PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1"
    ;;
*)
    ;;
esac

But my question is - why it doesn't work by default? Is it a bug or it should be so?

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu gnome-terminal Edit question
Assignee:
No assignee Edit question
Solved by:
samuel
Solved:
2012-09-09
Last query:
2012-09-09
Last reply:
2012-09-09

I suggest you report a bug if you suspect one

Best samuel (samuel-h) said : #2

Click edit, then profiles, then select the profile you use, (if you haven't made any profiles this will be called default), then go to the title and command page, and change the option, when terminal commands set there own titles to keep initial title.
I think the issue happens becuase bash is autimatically run when you start the terminal, and this sets the title to the current location, if you look carefully when you open a terminal the title will be terminal for a second, and will then change to your current location, however if you change the option to replace initial title, the title will be terminal by default, and will change when running with --title

Sergey Pashinin (pashinin) said : #3

Thanks samuel, that solved my question.

E2rd (r-ubunt3-5) said : #4

I had no problem with --title parameter in the past. But now, it doesn't work anymore. So I tried to commend the PS1 line in .bashrc but with no help. The new terminal window has title "Terminal" (see screenshot).
http://imgur.com/cFrr7Nt

Thanks for your ideas,
 Edvard
Ubuntu 15.04, GNOME Terminal 3.14.2

Zach Pfeffer (pfefferz) said : #5

For other people Googling for this that are running Ubuntu 16.04 this worked for me:

PS1=$
PROMPT_COMMAND=
echo -en "\033]0;New title\a"

More details here: http://www.zachpfeffer.com/single-post/Change-the-title-of-a-terminal-on-Ubuntu-1604