Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Previously I changed my gnome-terminal title to display which server I was logged into. I don't remember how I did this and I can't change it now.

I ran through my .bashrc and found nothing that would set it, and logged in as su. As superuser the title also changes.

I checked my .Xdefaults file... nothing

I tried to open a gnome terminal with:

gnome-terminal --title=$PWD 

Any title I set with the above command or PROMPT_COMMAND will be shown for half a second and then revert to my server name.

I looked through the terminal settings too. Any thoughts where I could have made this change? Running on CentOS.

share|improve this question
What's your PS1 variable? –  Aluísio A. S. G. Mar 12 '13 at 18:57
Here it is: [16:08]~>echo $PS1 [\e]2;\h\a][\A]\W>[\e[0m] –  mr odus Mar 12 '13 at 20:08

1 Answer 1

You can do so by:

wmctrl -r :ACTIVE: -N "MyWindowTitle"

to note - you need the wmctrl package first.


You can find more possible solutions at the given source.

share|improve this answer
Stop apologizing for short answers -- this is plenty adequate IMO. :) But, if you really don't feel you have the time to post a decent answer, please just don't post one. :) –  Ƭᴇcʜιᴇ007 Mar 12 '13 at 23:43
Same problem, the title will flash "MyWindowTitle" and then go right back to the hostname. –  mr odus Mar 13 '13 at 15:00

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.