Late last year, I wrote a patch for GNOME Terminal to make it flash the window list icon when a command you ran in the background finished.

The GNOME Terminal maintainer asked me to make some changes to get it accepted.

In response, I wrote a new patch for GNOME Terminal 2.26.

Then last Friday, we had a "Hackathon" day at work, a day where we get to work on any project we like.

I figured I'd improve on this work and also display a desktop notification after seeing how cool they look in Ubuntu 9.04 [video].

There's now another patch that you should apply on top of the other patch that will make it look something like this.

GNOME Terminal desktop notifications in action



Hopefully it's coming to a distribution near you!

Until then, you can install it manually.

You'll need VTE version 0.20 or higher, plus some other development libraries. (Ubuntu 9.04 is recommended, but not required: it will work in Ubuntu 8.10 provided you download VTE from SVN.)

Steps to install:

  1. Run these commands

    $ sudo apt-get install gnome-devel libvte-dev libnotify-dev
    $ mkdir gnome-terminal
    $ cd gnome-terminal
    $ svn co -r 3419 http://svn.gnome.org/svn/gnome-terminal/trunk
    $ cd trunk
    $ wget -O ~/patch1.diff http://bugzilla.gnome.org/attachment.cgi?id=133862
    $ wget -O ~/patch2.diff http://bugzilla.gnome.org/attachment.cgi?id=134686
    $ patch -p0 < ~/patch1.diff
    $ patch -p1 < ~/patch2.diff
    $ ./autogen.sh
    $ make
    $ sudo make install
    $ echo -E 'PS1="\\007$PS1"' >> ~/.bashrc # or ~/.zshrc or whatever
  2. Close all GNOME Terminal windows
  3. Open GNOME Terminal
  4. Go to Profile->Profile Preferences
  5. Check/tick
    • Flash the window list icon and bold the tab title when the terminal rings the bell
    • Show a desktop notification when the terminal rings the bell
  6. Run a long command (e.g. sleep 15)
  7. Switch to another program window (e.g. Firefox, Evolution, etc.) while you're waiting

Voila!

Labels: , ,

Blogger Martin Häger said...

Nice work! I've uploaded a gnome-terminal package including the first patch to the Arch User Repository for easy install under Arch Linux: http://aur.archlinux.org/packages.php?ID=28871

 
Blogger Mikel Ward said...

Thanks Martin!

It will be great when it starts to be a standard feature on Linux desktops. :-)

 

Post a Comment