This question already has an answer here:

How can I change the title of the xfce4-terminal (0.6.3) window, from within the terminal for the current session?

I can change the title by using the Menu bar Terminal, then Set Title....

I've tried the following, which I found while researching the matter, but none of them worked:

echo -ne "\033]0;SOME TITLE HERE\007"

printf '\033]0;%s\007' 'SOME TITLE HERE'


xtermset -T 'SOME TITLE HERE'

The solution states in the similar questions does not seem to work in my case.

marked as duplicate by Thomas Dickey, HalosGhost, Eric Renouf, Jeff Schaller, countermode Oct 22 '16 at 20:37

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • The 1st, 2nd and 4th versions are correct. The only problem with them is probably that immediately after they set the title the shell prompt is displayed again which resets it. Check your PS1 and PROMPT_COMMAND variables do make sure this is the case. I don't know where you found the 3rd version, it's horribly broken, it does not set the title at all and breaks plenty of apps. – egmont Oct 22 '16 at 16:54
  • So how do I prevent the reset and make the change for the current terminal session? – boolean.is.null Oct 22 '16 at 16:56
  • You need to define the PS1 and/or PROMPT_COMMAND variables in your .profile or .bashrc in a way that they do not alter the terminal title. – egmont Oct 23 '16 at 15:25
  • the point IS to alter the terminal title, so your telling me define it to alter but in a way that they dont alter it. what? – qrtLs Jul 2 at 23:49

I have been able to change the title using this command:

PROMPT_COMMAND='echo -ne "\033]0;SOME TITLE HERE\007";'

Unfortunately, in my tests with xfce4-terminal, this only changes part of the title. So the new title is:


I'm guessing this is not the behavior you desire but it is probably as close as you will get with xfce4-terminal. This methods works perfectly fine with urxvt.

  • that doesn't work for me, what version of xfce4-terminal do you use? – boolean.is.null Oct 22 '16 at 13:28
  • I ran this test using version 0.6.3 on Arch Linux. – tedm1106 Oct 22 '16 at 13:32
  • 2
    That's weird. I'm on Debian Stretch with xfce4-terminal 0.6.3 and the title doesn't change at all with the above echo command. – boolean.is.null Oct 22 '16 at 13:34
  • Regarding the "Terminal - TITLE", xfce-terminal (at least for >= 0.8) has Edit->Preferences->General->Title->Dynamically-set title->Replaces initial title. – tokland Jul 11 '17 at 6:59
  • try PS1 instead of PROMPT_COMMAND – qrtLs Jul 2 at 23:47

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