How to start Thunderbird minimized on start-up?












18















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?










share|improve this question

























  • Possible duplicate? askubuntu.com/questions/68640/…

    – fossfreedom
    Jul 28 '12 at 22:40











  • Might be a duplicate of this question: askubuntu.com/questions/68284/…

    – Glutanimate
    Sep 6 '12 at 4:20
















18















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?










share|improve this question

























  • Possible duplicate? askubuntu.com/questions/68640/…

    – fossfreedom
    Jul 28 '12 at 22:40











  • Might be a duplicate of this question: askubuntu.com/questions/68284/…

    – Glutanimate
    Sep 6 '12 at 4:20














18












18








18


3






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?










share|improve this question
















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?







startup thunderbird






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jul 13 '14 at 13:55









Glutanimate

16.3k874132




16.3k874132










asked Jul 28 '12 at 22:15









LevanLevan

4,802216083




4,802216083













  • Possible duplicate? askubuntu.com/questions/68640/…

    – fossfreedom
    Jul 28 '12 at 22:40











  • Might be a duplicate of this question: askubuntu.com/questions/68284/…

    – Glutanimate
    Sep 6 '12 at 4:20



















  • Possible duplicate? askubuntu.com/questions/68640/…

    – fossfreedom
    Jul 28 '12 at 22:40











  • Might be a duplicate of this question: askubuntu.com/questions/68284/…

    – Glutanimate
    Sep 6 '12 at 4:20

















Possible duplicate? askubuntu.com/questions/68640/…

– fossfreedom
Jul 28 '12 at 22:40





Possible duplicate? askubuntu.com/questions/68640/…

– fossfreedom
Jul 28 '12 at 22:40













Might be a duplicate of this question: askubuntu.com/questions/68284/…

– Glutanimate
Sep 6 '12 at 4:20





Might be a duplicate of this question: askubuntu.com/questions/68284/…

– Glutanimate
Sep 6 '12 at 4:20










7 Answers
7






active

oldest

votes


















4














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






share|improve this answer



















  • 27





    Welcome to Ask Ubuntu! Whilst this may theoretically answer the question, it would be preferable to include the essential parts of the answer here, and provide the link for reference.

    – fossfreedom
    Sep 6 '12 at 11:44





















8














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






share|improve this answer





















  • 3





    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 3 '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.






share|improve this answer

































    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).






    share|improve this answer































      0















      • Press [Alt]+F2 to run command

      • Run gnome-session-properties

      • Add /usr/bin/thunderbird






      share|improve this answer

































        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
        (is (window_name) "Mozilla Thunderbird")
        (begin
        (minimize)
        )
        )


        4) Add devilspie to Startup Applications



        5) Add thunderbird to Startup Applications



        6) Optionally install Keep in Taskbar (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:



        https://web.archive.org/web/20160415011438/http://foosel.org/linux/devilspie



        https://wiki.gnome.org/Projects/DevilsPie



        https://help.ubuntu.com/community/Devilspie






        share|improve this answer

































          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






          share|improve this answer
























            Your Answer








            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "89"
            };
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function() {
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled) {
            StackExchange.using("snippets", function() {
            createEditor();
            });
            }
            else {
            createEditor();
            }
            });

            function createEditor() {
            StackExchange.prepareEditor({
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader: {
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            },
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            });


            }
            });














            draft saved

            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f169437%2fhow-to-start-thunderbird-minimized-on-start-up%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            7 Answers
            7






            active

            oldest

            votes








            7 Answers
            7






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            4














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






            share|improve this answer



















            • 27





              Welcome to Ask Ubuntu! Whilst this may theoretically answer the question, it would be preferable to include the essential parts of the answer here, and provide the link for reference.

              – fossfreedom
              Sep 6 '12 at 11:44


















            4














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






            share|improve this answer



















            • 27





              Welcome to Ask Ubuntu! Whilst this may theoretically answer the question, it would be preferable to include the essential parts of the answer here, and provide the link for reference.

              – fossfreedom
              Sep 6 '12 at 11:44
















            4












            4








            4







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






            share|improve this answer













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







            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered Sep 6 '12 at 3:16









            JackJack

            802




            802








            • 27





              Welcome to Ask Ubuntu! Whilst this may theoretically answer the question, it would be preferable to include the essential parts of the answer here, and provide the link for reference.

              – fossfreedom
              Sep 6 '12 at 11:44
















            • 27





              Welcome to Ask Ubuntu! Whilst this may theoretically answer the question, it would be preferable to include the essential parts of the answer here, and provide the link for reference.

              – fossfreedom
              Sep 6 '12 at 11:44










            27




            27





            Welcome to Ask Ubuntu! Whilst this may theoretically answer the question, it would be preferable to include the essential parts of the answer here, and provide the link for reference.

            – fossfreedom
            Sep 6 '12 at 11:44







            Welcome to Ask Ubuntu! Whilst this may theoretically answer the question, it would be preferable to include the essential parts of the answer here, and provide the link for reference.

            – fossfreedom
            Sep 6 '12 at 11:44















            8














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






            share|improve this answer





















            • 3





              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 3 '13 at 10:48


















            8














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






            share|improve this answer





















            • 3





              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 3 '13 at 10:48
















            8












            8








            8







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






            share|improve this answer















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







            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited Apr 13 '17 at 12:23









            Community

            1




            1










            answered Sep 6 '12 at 4:14









            GlutanimateGlutanimate

            16.3k874132




            16.3k874132








            • 3





              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 3 '13 at 10:48
















            • 3





              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 3 '13 at 10:48










            3




            3





            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 3 '13 at 10:48







            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 3 '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.






            share|improve this answer






























              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.






              share|improve this answer




























                4












                4








                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.






                share|improve this answer















                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.







                share|improve this answer














                share|improve this answer



                share|improve this answer








                edited Apr 13 '17 at 12:23









                Community

                1




                1










                answered Oct 27 '16 at 1:24









                Loves ProbabilityLoves Probability

                1738




                1738























                    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).






                    share|improve this answer




























                      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).






                      share|improve this answer


























                        1












                        1








                        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).






                        share|improve this answer













                        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).







                        share|improve this answer












                        share|improve this answer



                        share|improve this answer










                        answered Feb 4 '14 at 1:33









                        KoRnKloWnKoRnKloWn

                        537515




                        537515























                            0















                            • Press [Alt]+F2 to run command

                            • Run gnome-session-properties

                            • Add /usr/bin/thunderbird






                            share|improve this answer






























                              0















                              • Press [Alt]+F2 to run command

                              • Run gnome-session-properties

                              • Add /usr/bin/thunderbird






                              share|improve this answer




























                                0












                                0








                                0








                                • Press [Alt]+F2 to run command

                                • Run gnome-session-properties

                                • Add /usr/bin/thunderbird






                                share|improve this answer
















                                • Press [Alt]+F2 to run command

                                • Run gnome-session-properties

                                • Add /usr/bin/thunderbird







                                share|improve this answer














                                share|improve this answer



                                share|improve this answer








                                edited Aug 1 '18 at 22:22

























                                answered Aug 1 '18 at 22:00









                                Simon RigétSimon Rigét

                                993




                                993























                                    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
                                    (is (window_name) "Mozilla Thunderbird")
                                    (begin
                                    (minimize)
                                    )
                                    )


                                    4) Add devilspie to Startup Applications



                                    5) Add thunderbird to Startup Applications



                                    6) Optionally install Keep in Taskbar (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:



                                    https://web.archive.org/web/20160415011438/http://foosel.org/linux/devilspie



                                    https://wiki.gnome.org/Projects/DevilsPie



                                    https://help.ubuntu.com/community/Devilspie






                                    share|improve this answer






























                                      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
                                      (is (window_name) "Mozilla Thunderbird")
                                      (begin
                                      (minimize)
                                      )
                                      )


                                      4) Add devilspie to Startup Applications



                                      5) Add thunderbird to Startup Applications



                                      6) Optionally install Keep in Taskbar (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:



                                      https://web.archive.org/web/20160415011438/http://foosel.org/linux/devilspie



                                      https://wiki.gnome.org/Projects/DevilsPie



                                      https://help.ubuntu.com/community/Devilspie






                                      share|improve this answer




























                                        0












                                        0








                                        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
                                        (is (window_name) "Mozilla Thunderbird")
                                        (begin
                                        (minimize)
                                        )
                                        )


                                        4) Add devilspie to Startup Applications



                                        5) Add thunderbird to Startup Applications



                                        6) Optionally install Keep in Taskbar (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:



                                        https://web.archive.org/web/20160415011438/http://foosel.org/linux/devilspie



                                        https://wiki.gnome.org/Projects/DevilsPie



                                        https://help.ubuntu.com/community/Devilspie






                                        share|improve this answer















                                        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
                                        (is (window_name) "Mozilla Thunderbird")
                                        (begin
                                        (minimize)
                                        )
                                        )


                                        4) Add devilspie to Startup Applications



                                        5) Add thunderbird to Startup Applications



                                        6) Optionally install Keep in Taskbar (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:



                                        https://web.archive.org/web/20160415011438/http://foosel.org/linux/devilspie



                                        https://wiki.gnome.org/Projects/DevilsPie



                                        https://help.ubuntu.com/community/Devilspie







                                        share|improve this answer














                                        share|improve this answer



                                        share|improve this answer








                                        edited Aug 6 '18 at 11:22

























                                        answered Jul 13 '18 at 15:35









                                        grisfergrisfer

                                        1565




                                        1565























                                            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






                                            share|improve this answer




























                                              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






                                              share|improve this answer


























                                                0












                                                0








                                                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






                                                share|improve this answer













                                                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







                                                share|improve this answer












                                                share|improve this answer



                                                share|improve this answer










                                                answered Mar 18 at 0:19









                                                M.T.M.T.

                                                1




                                                1






























                                                    draft saved

                                                    draft discarded




















































                                                    Thanks for contributing an answer to Ask Ubuntu!


                                                    • Please be sure to answer the question. Provide details and share your research!

                                                    But avoid



                                                    • Asking for help, clarification, or responding to other answers.

                                                    • Making statements based on opinion; back them up with references or personal experience.


                                                    To learn more, see our tips on writing great answers.




                                                    draft saved


                                                    draft discarded














                                                    StackExchange.ready(
                                                    function () {
                                                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f169437%2fhow-to-start-thunderbird-minimized-on-start-up%23new-answer', 'question_page');
                                                    }
                                                    );

                                                    Post as a guest















                                                    Required, but never shown





















































                                                    Required, but never shown














                                                    Required, but never shown












                                                    Required, but never shown







                                                    Required, but never shown

































                                                    Required, but never shown














                                                    Required, but never shown












                                                    Required, but never shown







                                                    Required, but never shown







                                                    Popular posts from this blog

                                                    數位音樂下載

                                                    When can things happen in Etherscan, such as the picture below?

                                                    格利澤436b