13

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 it's 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?

5 Answers 5

18

just run

gconftool-2 --set /apps/guake/general/use_vte_titles --type boolean false

and restart your terminal,

easy as pie(3.14)

8

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.

2
  • Is it possible to do it with gsettings on the commandline?
    – qed
    Nov 8, 2014 at 21:21
  • 1
    @qed should work like that: gconftool --set /apps/guake/general/use_vte_titles --type boolean true
    – chsymann
    May 13, 2015 at 9:02
4

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.

2

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:

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

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

1
  • 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, 2013 at 12:49
1

Yeah I had this issue as well and I am so surprised that it still appears in recent Guake versions. In the latest version I think there is an option to name the terminals as Terminal 1, Terminal 2 etc which doesn't help much either.

In the past few years I have employed a simple script in my .zshrc (I use Zsh terminal, but you can apply something similar in Bash).

function chpwd {
 if [ -e ".guakerc" ]; then
   setupguake
 else
    guake -r ${PWD##*/}
 fi
}

function setupguake() {
  . $(pwd)/.guakerc

  if ((${+name})); then
    guake -r ${name}
  fi
}

Essentially what this does, it monitors any directory change (through chpwd) and if a .guakerc file is found it runs it. Inside that file you can setup the guake title and many other things.

If no .guakerc file is found (the most usual case), it just sets the folder name as the terminal name. So if you are in a folder named /home/username/Development/social-app it will rename the terminal as social-app.

Hope it helps!

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .