23

I followed this tutorial to set start Thunderbird in minimized mode at startup, but it wasn't helpful.

After following the instructions, I could not even start Thunderbird. So I was forced to start TB in safe mode to delete the "FireTray Plugin" and fix this issue. After that it started to work but it deleted all my email accounts and I had to do that chore all over again .

So is there any working way to start Thunderbird minimized on start-up?

Glutanimate
  • 21,393
Levan
  • 10,880
  • Possible duplicate? http://askubuntu.com/questions/68640/how-do-i-hide-thunderbird-from-the-launcher-while-running – fossfreedom Jul 28 '12 at 22:40
  • Might be a duplicate of this question: http://askubuntu.com/questions/68284/how-to-keep-thunderbird-and-pidgin-running-on-background – Glutanimate Sep 06 '12 at 04:20

8 Answers8

8

I used this addon to start thunderbird in minimized mode by default and added a startup entry for thunderbird by following this guide.

Glutanimate
  • 21,393
  • 4
    Thanks for pointing at this *Minimize On Start and Close Add-On* which seems to be the most straightforward way of Starting Thunderbird Minimized to Unity Launcher where you can see the new message count, etc. as well. – Sadi Nov 03 '13 at 10:48
4

Let me make it clear, at least for people like me.

Making sure that thunderbird is automatically started on logon, involves just three steps:

  1. Install "FireTray" addon on thunderbird
  2. check "start application hidden to tray" option in FireTray preferences (Thunderbird -> Tools -> addons -> firetray -> preferences -> under tab "windows")
  3. Follow this answer (its quick) to add thunderbird to startup (Note: the command field therein should be: thunderbird or /usr/bin/thunderbird)

Note that FireTray addon is a must have. Most people don't actually mean to quit entirely like the default behavior is, when they say "close" to window. They sure expect thunderbird to run in background and notify of all new email arrivals. And FireTray deals exactly with this problem.

2

http://ubuntuforums.org/showthread.php?t=1529056

Jack
  • 84
1

I am actually using Ubuntu 13.10, but this solution should work fine at least back to 12.04. Firetray is an extension for Firefox that makes it so you can minimize to tray on close, and minimize on startup (you'll see the Thunderbird window popup for a quick second, but it's hardly an issue). Then just add thunderbird to Startup Applications and when you login thunderbird will flash for a second then be minimized in your system tray. It also has full support for the default messaging menu so it doesn't create a secondary thunderbird icon.

Now for those that may have tried this in the past, I know that I tried Firetray a couple years ago and it wouldn't work at all, it had lots of bugs when used with modern Ubuntu, but the latest version seems to work flawlessly with Ubuntu (at least version 13.10, but I don't see why it wouldn't work with any other version).

KoRnKloWn
  • 817
0

For Ubuntu 18.04+

  1. Install devilspie package:

    sudo apt install devilspie

  2. Create ~/.devilspie folder and thunderbird.ds file in that folder:

    mkdir -p ~/.devilspie && touch ~/.devilspie/thunderbird.ds

  3. Paste this code in ~/.devilspie/thunderbird.ds file:

    (if
        (or
            (is (window_name) "Mozilla Thunderbird")
            (is (window_name) "Home - Mozilla Thunderbird")
        )
        (begin
           (minimize)
        )
    )
    
  4. Add devilspie to Startup Applications

  5. Add thunderbird to Startup Applications

  6. Optionally install Minimize on Close (add-on for Thunderbird that makes the Close button behave exactly like the Minimize one)

  7. Reboot.

Tip: How to delay a specific program on startup

devilspie' docs:


Alternative: Devilspie2

grisfer
  • 527
0
  • Press [Alt]+F2 to run command
  • Run gnome-session-properties
  • Add /usr/bin/thunderbird
0

Ubuntu 16.04.

Had the same problem and used following to achieve the goal. Autostart entry added running thunderbird through this script:

#!/usr/bin/env python3
import subprocess
import sys
import time

#
# Check out command
#
command = sys.argv[1]

#
# Run it as a subservice in own bash
#
subprocess.Popen(["/bin/bash", "-c", command])

#
# If a window name does not match command process name, add here. 
# Check out by running :~$ wmctrl -lp
# Do not forget to enable the feature, seperate new by comma.
#
#windowProcessMatcher = {'CommandName':'WindowName'}
#if command in windowProcessMatcher:
#    command = ''.join(windowProcessMatcher[command])
#print("Command after terminator" + command)

#
# Set some values. t is the iteration counter, maxIter guess what?, and a careCycle to check twice.
#
t = 1
maxIter=30
wellDone=False
careCycle=True
sleepValue=0.1

#
# MaxIter OR if the minimize job is done will stop the script.  
# 
while not wellDone:
    # And iteration count still under limit. Count*Sleep, example: 60*0.2 = 6 seconds should be enough.
    # When we found a program
    if t >= maxIter:
        break
    # Try while it could fail.
    try:
        # Gives us a list with all entries
        w_list = [output.split() for output in subprocess.check_output(["wmctrl", "-lp"]).decode("utf-8").splitlines()]
        # Why not check the list? 
        for entry in w_list:
            # Can we find our command string in one of the lines? Here is the tricky part: 
            # When starting for example terminator is shows yourname@yourmaschine ~. 
            # Maybee some matching is needed here for your purposes. Simply replace the command name
            # But for our purposes it should work out.
            #
            # Go ahead if nothing found!
            if command not in (''.join(entry)).lower():
                continue
            #######
            print("mt### We got a match and minimize the window!!!")
            # First entry is our window pid
            match = entry[0]
            # If something is wrong with the value...try another one :-)
            subprocess.Popen(["xdotool", "windowminimize", match])
            # 
            # Maybee there will be more than one window running with our command name. 
            # Check the list till the end. And go one more iteration!   
            if careCycle:
                # Boolean gives us one more iteration.
                careCycle=False
                break
            else:
                wellDone=True
    except (IndexError, subprocess.CalledProcessError):
        pass
    t += 1
    time.sleep(sleepValue)

if wellDone:
    print(" ")
    print("mt### Well Done!")
    print("mt### Window found and minimize command send.")
    print("mt### ByBy")
else:
    print(" ")
    print("mt### Seems that the window while counter expired or your process command did not start well.")
    print("mt### == Go ahead. What can you do/try out now? ")

This should work for every other app too.

Good coding

M.T.
  • 1
0

I currently run Ubuntu 20.04 and Thunderbird 102.9.0 and an extension works for me to start up minimized. "Minimize on startup 1.0" by aAndrzej-dev.

FireTray isn't available.