Birdtray Ubuntu PPA Updated With Unread Email Count And Xwayland Fixes (Thunderbird Tray Icon)
Birdtray is a system tray icon for Thunderbird, which shows the unread email count, with some extra features.
The application has stopped working a while back—it no longer shows the unread email count with newer Thunderbird versions (both the latest Thunderbird 102.* stable and the latest beta—112 at the time I'm writing this article), and it doesn't work properly on Wayland either. I have updated the Linux Uprising Apps PPA for Ubuntu and derivatives (and Linux distributions based on it, like Linux Mint, Pop!_OS, etc.) with fixes/workarounds for these issues, and I'll also explain what I did so you can replicate this on other Linux distributions if you want to use Birdtray.
But first, let me show you what Birdtray can do. The application features include:
- Thunderbird tray icon with unread email counter
- The tray icon can flash (blink) when new emails are received
- Configurable accounts/mail folder for which it should check for new emails
- Configurable unread count font colors for different email accounts
- Can hide and restore the Thunderbird window by double-clicking on the tray icon or from its menu
- Can automatically start Thunderbird when launching Birdtray and close Thunderbird when exiting the tray icon
- Can detect if Thunderbird was accidentally closed and re-launch it
- Snooze new email notifications for a predefined amount of time
- Allows adding pre-configured email templates to the tray for quick access
Birdtray was updated, but not really
The latest Birdtray release (at the time I'm writing this) on its GitHub releases page is currently version 1.9.0, published in October 2020. This version can no longer show the unread email count for Thunderbird 102 and newer versions, like the brand new Thunderbird 112 beta.
But there was, in fact, a new Birdtray release (1.10) since then, at least according to the Git commit log. However, this release was not tagged, so it doesn't appear on the Birdtray GitHub releases page. For this reason, Linux distributions (and other places where Birdtray is published as a binary, like Flathub) did not update to this version.
This "unofficial" Birdtray 1.10 release had an issue with the translations, which was later fixed. There's also a new feature added after this: when Thunderbird is not running, the user can now start it by clicking the Birdtray system tray icon; Thunderbird is then optionally hidden; two settings were added in the Hiding
tab to control this behavior.
So I've decided to grab the latest Birdtray from Git and package it as a DEB in the Linux Uprising Apps PPA, which can be used on Ubuntu, Linux Mint, Pop!_OS, and othre Linux distributions based on Ubuntu.
Birdtray Wayland (Xwayland) workarounds
This gets the Birdtray unread email counter to work with Thunderbird 102 and latest beta, but I also wanted to get it to work with Wayland, which I use on my GNOME desktop.
I found this bug report in which some users have managed to get Birdtray to work on Wayland (Xwayland), but with mixed results. I wanted to get it to work on both GNOME and KDE with Wayland, and regardless if Thunderbird itself is running on Wayland or Xwayland.
What worked in my tests (on Ubuntu with GNOME running on Wayland, Kubuntu with Wayland and Manjaro KDE with Wayland) was to start Birdtray using env XDG_SESSION_TYPE=x11 birdtray
, and in the Birdtray settings have the Thunderbird command line option (on the Advanced
tab) set to /usr/bin/env GDK_BACKEND=x11 /usr/bin/thunderbird
.
I wanted this to be used automatically, so I patched Birdtray to use this. But if you had Birdtray installed previously, you may need to modify the Thunderbird command line option (Advanced
tab) to /usr/bin/env GDK_BACKEND=x11 /usr/bin/thunderbird
manually!
Also, make sure you launch Birdtray from the applications menu, and not a terminal, so it uses the environment variable I mentioned above.
Hopefully this works for everyone running Wayland, and not just on the 3 systems I've tested it on 😀️.
Install Birdtray on Ubuntu, Linux Mint, Pop!_OS and other Ubuntu-based Linux distributions from PPA
You can add the Linux Uprising Apps PPA and install Birdtray on Ubuntu (23.04, 22.10, 22.04, 20.04 and 18.04), Linux Mint (21.*, 20.* and 19.*), Pop!_OS (23.04, 22.10, 22.04, 20.04 and 18.04) and other Ubuntu-based Linux distributions using the commands below:
sudo add-apt-repository ppa:linuxuprising/apps
sudo apt update
sudo apt install birdtray
Instead of adding the PPA, you may download the Birdtray DEB package built in the PPA by visiting this page, but do note that unfortunately this link doesn't support https. Or you could visit the PPA page and download the DEB from there.
If you don't want to use my binaries, you can build the latest Birdtray from Git yourself.
I also want to mention the settings I'm using with Birdtray, maybe you want to achieve the same result, and you're not very familiar with this application.
I wanted Birdtray to feel like being basically part of Thunderbird, so when I close Birdtray, Thunderbird closes, when I start Birdtray it starts Thunderbird, minimize and close Thunderbird to the tray, and so on. To achieve this, I enabled all the checkboxes from the Birdtray Hiding
tab.
Also, my vision is not what it used to be, and I can't see the number of unread emails shown on top of the Birdtray tray icon using the default settings (while using GNOME). So on the Birdtray General
tab, I've changed the font bold option to 140%, and the notification border color width to 40%. This works great for me, but then again I don't usually have more than 9 unread emails, so you might need to tweak it further if you usually have more than that.