2

There is actually a question that covers this same topic, but none of the answers worked for me, at least not completely.

The accepted answer is just a link to this forum thread, and based on one of its suggestions (that didn't work for me initially), I managed to put together this:

#!/bin/bash

thunderbird &
while [[ $(wmctrl -l | grep "Mozilla Thunderbird") == "" ]]; do sleep 0.1; done
xdotool windowactivate --sync `xdotool search --name "Mozilla Thunderbird"`
sleep 0.1       # prevents flakiness
xdotool key alt+F4
exit 0

Which, together with the addon MinimizeToTray revived to cause it to minimize to tray instead of closing, works. I have it set to run automatically, and it closes the window, but the mail notification applet in the system tray still turns blue when I have an email.

The only problem is that, when logging in, you will still see the window "flash" as it opens and closes, and I find this annoying (though I'm willing to put up with it if I have to).

There is another, similar add-on called FireTray which has the advantage that you can set Thunderbird to open automatically minimized to the system tray (and this works), negating the need for a script (all you would need to do is set up the extension, then add thunderbird to the startup programs).

However, for reasons I don't really understand, enabling FireTray messes up the icons for Firefox and Thunderbird. They become really blurry, and I can't figure out how to fix it. I googled to see if anyone had this problem, but I couldn't find anything.

Basically, my question is just if anyone has any ideas on either how to fix either of these problems. Either prevent FireTray from messing up the icons, or close Thunderbird with MinimizeToTray revived without the window flashing.

Edit: After experimenting with FireTray more, I realized that it does the same window flashing thing, which makes me think it's unlikely to prevent or hide it.

  • I fear you have to bear the flashing. None of those work and I don't see why that flashing matter that much. – Anwar Sep 3 '16 at 7:30
  • I saw that if you configure Thunderbird, it appears under the messaging icon in Unity automatically. Was it enough? – Anwar Sep 3 '16 at 13:00
  • @Anwar I've not seen any indication that this is possible in vanilla Thunderbird. Can you elaborate? – Kevin Sep 3 '16 at 15:39
  • I meant this one imgur.com/GZ8WH3L – Anwar Sep 3 '16 at 15:44
  • @Anwar That's the one I'm trying to use already. It works (becomes blue), when you have a new email, but only while Thunderbird is running. THe MinimizeToTray revived addon causes it work even after you close it (because you're really just hiding it), and I got that to work (with window flashing) using a script to open it and then close it at startup. I just find the window flashing irritating and would prefer it to be completely invisible until I choose to open Thunderbird myself. – Kevin Sep 3 '16 at 15:50
1

You can try MailNag:

sudo add-apt-repository -y ppa:pulb/mailnag
sudo apt -y update
sudo apt -y install mailnag-unity-plugin mailnag

Then, run mailnag-config and set up your Accounts (to my knowledge, there's no automated way to import all Thunderbird email accounts), and then make sure the Unity plugin is enabled.

You don't need any add-ons for Thunderbird; in fact, I would actually advise removing the default Messaging Menu and Unity Launcher Integration add-on, because you can open the default email client from the Unity panel via mailnag, and so there's little point for it.

mailnag should automatically set itself as a startup script, so you should get both notifications in the panel (read: the mail icon turns blue) and the overlay style notifications like when you connect/disconnect from a network.

This obviously doesn't actually 'start Thunderbird minimized to system tray on start-up', but it does solve my underlying problem of 'automatically get email notifications in Unity panel on start-up', and the only difference between it and my intended behavior is that thunderbird isn't running. I suppose this is probably why I couldn't find anything about it; now that I know to search for mailnag and found a couple relevant questions.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.