Fixing ‘guake can not init’ and buggy tab titles on Backtrack 5 R3

Hi Folks, I’m a heavy Guake Terminal user and I just installed the latest Backtrack 5 revision (R3) and installed Guake on it. I was surprised when I tried to start by getting the message:

“Guake can not init!\n\nGconf Error.\nHave you installed guake.schemas properly?”

Long story short, it seems that the package bundled with this version of Backtrack (and maybe others) have a bug into the debian package file/script that installs the guake.schemas file into an erroneous location (/usr/etc/gconf/schemas/).

The location should be /etc/gconf/schemas/guake.schemas. You’ll have to mkdir this schemas directory under /etc/gconf and mv or ln -s this file there. Problem solved.

Buggy tab titles

Other thing that annoys me a LOT is that some versions (0.4.1 and maybe older ones) of Guake have a bug in the tab titles setting mechanism. It simply goes blank and you’re left with a blank title when you try to change it.

You’ll have to hack up a Guake file to fix that:

  1. Edit guake.py (on BT5R3 is at /usr/lib/guake/guake.py
  2. Comment out the following code on line 983: dialog.destroy()
  3. Copy that same code (uncommented of course) below the if statement (about line 987)
  4. Save and restart Guake
  5. Enjoy!

This solution was found here.

Well, that’s all for now! Hope that this hint helps someone!

Terminal auto-lock with zsh and vlock

I’m always concerned about leaving terminal sessions open. I’ve used for many and many years the $TMOUT environment variable to close my sessions if idle for N seconds.

Just by exporting the TMOUT variable to the number of desired timeout seconds will close your shell (Bash, Ksh, Zsh and some others).

The following example will timeout in 300 seconds (5 minutes)

I am currently reading the book Secure Coding: Principles & Practices and the authors cited this timeout technique as pretty ineffective since it annoys more than it helps. I was obliged to agree. I got pretty mad with it some good times.

So I started looking for alternatives.

I’ve found a console application called vlock. It should be available on most distro’s repositories.

Just invoke vlock and the terminal session will be locked awaiting the user password to unlock. Pretty nice. Locking is definitely better than killing the session.

So I just started to wonder how to integrate vlock with zsh and after some research I’ve discovered that the shell will only be killed within TMOUT if no trap function for signal ALARM is set.

If you set an ALARM trap function, it will be called instead of killing the session. Perfect.

So I ended up with this in my .zshrc:

And now zsh locks my sessions after 10 minutes. It’s working perfectly even within tmux.

@UPDATE
As the comment from the reader Ehtesh Choudhury we can accomplish that in tmux only by adding to your configuration: