LGMTray: Lightweight GMail Notifier

LGMTray is a lightweight application that docks in your system tray, and notifies you when new mail has arrived on your GMail account. It is written in C++, is designed to have very few dependencies, and can therefore be easily built on many systems. Currently, only an X11 implementation is available (which uses the FreeDesktop.org System Tray Protocol), and the features are very limited.

You can see the application in action below (using Xystray and KDE respectively):

LGMTray in Xystray LGMTray in the KDE system tray

The reason why I wrote yet another GMail notifier is because all the other notifiers either did not work on Linux, or depended on packages that I did not have available on my machine.

If you encounter bugs, or have suggestions for improvement of this application, feel free to contact me.

Download

If you prefer not to build LGMTray yourself (see below for instructions), there is a static Linux/i386 binary available for download here. Simply download, bunzip, make it executable, and move it to a convenient location. For example:

wget http://el-tramo.be/files/lgmtray-0.1.i386.bz2
bunzip2 lgmtray-0.1.i386.bz2
chmod a+rx lgmtray-0.1.i386
mv lgmtray-0.1.i386 /usr/local/bin/lgmtray

Using

Download the sample configuration file lgmtray.sample_config, rename it to ~/.lgmtray, and edit it to reflect your username/password and preferences. Then, simply run the application by calling lgmtray.

Building

This section explains how to build the latest development version of LGMTray yourself.
First, make sure you have the necessary libraries installed. LGMTray currently needs the following libraries:

  • libcurl (with OpenSSL support)
  • libxml2
  • libxpm
  • Xlib (ships with your X installation)

Get the latest development source from the Git repository (or at GitHub), and build it using make.

git clone git://el-tramo.be/lgmtray
cd lgmtray
make

This should have build the binary lgmtray in the src subdir, which you can then copy to a more convenient location (such as /usr/local/bin).
If you have a special system setup, you should edit Makefile.config to reflect this in the build parameters.

Known Issues

On one of my machines, Curl crashes very regularly with a SIGPIPE when opening a connection. I have reported this to the Curl developers, but no cause has been found so far. As a workaround, LGMTray currently ignores SIGPIPE signals, and continues as normal. This should have no visual impact, except log messages saying that there was a problem, and that the application continues anyway.

TODO

  • Allow the background of the tray to be transparent, taking the system tray’s background color. This should be easy to do, but I currently lack the X11 programming knowledge to do this. Help is always appreciated.
  • Make the check interval dynamic, where mail is checked more frequently after new mail has arrived, less frequently when there is no mouse movement, …
  • Open GMail when the icon is clicked
  • Add a tooltip and a context menu

Links

  • Official GMail notifier: Works only on Windows and Mac OS X.
  • GMail Notifier: Written in Python, but has dependencies on several add-on Python modules (e.g. Gtk).
  • Xystray: A simple implementation of the FreeDesktop.org system tray.

One Response to “LGMTray: Lightweight GMail Notifier”

  1. [...] unable to meet on my machine (because I lack system administrator privileges). This is why I wrote LGMTray, a very basic GMail notifier, with very few [...]

Leave a Reply