Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I love Guake drop-down terminal, but it has an annoying issue. When I use many tabs, I hate when the tab names rename each time I execute a command or navigate in one of them. I want to rename any tab and maintain the name in all sessions. For instance, when I use Midnight Commander and I enter in a long path folder, the tab expands and its horrible. I see tab name mc [user@machine_name]:/weird/long/infinite/path when I navigate to /weird/long/infinite/path folder.

Can I have always the same name for each tab, even when renaming it manually?

share|improve this question

3 Answers 3

up vote 5 down vote accepted

I have found a way to disable the annoying renaming. I found in my guake Python script (in version 0.4.3-3) in lines 996 to 1002:

def on_terminal_title_changed(self, vte, box):
    use_them = self.client.get_bool(KEY("/general/use_vte_titles"))
    if not use_them:
        return
    page = self.notebook.page_num(box)
    self.tabs.get_children()[page].set_label(vte.get_window_title())

As the script shows, /general/use_vte_titles key prevents the autorenaming feature. It is Guake uses GConf to configure his options (explanation). I had to install gconf-editor package to edit Guake options executing sudo apt-get install gconf-editor. Then I executed gconf-editor, I browsed to /apps/guake/general and unmarked use_vte_titles key. Closed the editor. Next time I executed Guake the autorenaming feature was disabled.

Now, all the tabs are named Terminal and if I rename one, it still named all the session with the same name. It would be helpful to add this key into the Guake preferences dialogue. But this solution worked anyway.

share|improve this answer
    
Is it possible to do it with gsettings on the commandline? –  qed Nov 8 at 21:21

On the command line:

vim ~/.gconf/apps/guake/general/%gconf.xml

There should be an entry something like this:

<entry name="use_vte_titles" mtime="1404143215" type="bool" value="true"/>

Just change it to:

<entry name="use_vte_titles" mtime="1404143215" type="bool" value="false"/>

Save the file and restart guake.

share|improve this answer

Consider simply shortening the terminal title. The algorithm is defined in .bashrc, the terminal title will be respected by Guake as you have noticed:

My .bashrc contains the following:

# If this is an xterm set the title to user@host:dir
case "$TERM" in
xterm*|rxvt*)
    PROMPT_COMMAND='PS1X=$(pwd | sed -r "s-^$HOME/--;s-^$HOME-~-;s-^(.[^/]*)/.*/-\1/.../-")'
    PS1="\[\e]0;${debian_chroot:+($debian_chroot)}"'$PS1X'"\a\]$PS1"
    ;;
*)
    ;;
esac

The host name is not shown anymore, and only the first and the last path component is shown:

$HOME -> ~

$HOME/some/deep/sub/dir -> some/.../dir

/usr/local/deeply/inside/there -> /usr/.../there

With this setting, the tab buttons are narrow enough but still contain useful information.

See also:

http://stackoverflow.com/q/3497885/946850

http://unix.stackexchange.com/q/26844/19205

share|improve this answer
    
It is a good option, but my question was 'Can I have always the same name for each tab, even when renaming it manually?'. It can be achieved with my approach. –  logoff Jun 3 '13 at 12:49

Your Answer

 
discard

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.