Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I use guake very heavily, and ssh into more than 3 computers at any point in time. I also have daemons running on some tabs (terminals). What I want to know, Is it possible to have the name of the current command as the name of the Terminal? Rightclikcing a tab, and changing its name causes this: (Look at the tab after Terminal 5)

Look at the tab after Terminal 5


share|improve this question
See my answer to a related question to show an abbreviated representation of the current directory as tab title. – krlmlr May 15 '13 at 8:22
up vote 3 down vote accepted

This is a guake (0.4.1) bug. I just see and solve this problem via this bug report though the author say this is not the best method:

i've found out that moving the dialog destruction code ( line 983) down after the code that sets the tab label (line 986) actually solves the problem. so the the code that works for me look like this:

    response =
    # dialog.destroy() 

    if response == gtk.RESPONSE_ACCEPT:


maybe there is some problem with gtk and dialogs, but i haven't found any code changes connected with gtk in the version 0.4.1 diff.

EDIT: guake 0.4.2 can change the tab name correctly

share|improve this answer

I am not sure this works for guake, it works for most terminal emulators. You can include an echo on your scripts to change the terminal title:

echo -ne "\033]0;your_title_here\007"
share|improve this answer
that didnt work, when I typed it in the terminal. – theTuxRacer Dec 27 '10 at 11:25
That's because your shell's prompt will usually set it to the current working directory. Check the PS1 variable. – ak2 Dec 27 '10 at 13:12

When I want to change the tab name in guake, I just right-click the tab name and left-click rename. A pop-up box opens to type the new name into.

share|improve this answer

Bit of a hack, but this will rename the current terminal to whatever you ssh'ed for.

function ssh() {
    guake -r "$@";
    /usr/bin/ssh $@

Also if you update your PROMPT_COMMAND, you can have a function to update the terminal name each time. Although this will not work for your ssh problem as it only changes the name after the command has run.


export PROMPT_COMMAND=renameTerminal

function renameTerminal() {
    guake -r "$SOMENAME";
share|improve this answer

If you change your shell to zsh, you can add this to your ~/.zshrc:

preexec() {
    echo -n '\e]0;'
    echo -nE "$1"
    print -nP '  (%~)'
    echo -n '\a'

and it will show the current command and the current working directory. This works for all terminal emulators, not just guake.

To install zsh:

sudo apt-get install zsh

to try it out just say


to make it your default for new terminals:

chsh -s /bin/zsh 
share|improve this answer
zsh doesnt work at all with guake :( – theTuxRacer Jan 11 '11 at 4:14
Oh, right, I remember hitting that problem before. But at least some of the bugs relating to it now seem to be fixed, eg <>;. – poolie Jan 11 '11 at 15:14

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.