Announcement

Collapse
No announcement yet.

AutoStart order?

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    AutoStart order?

    I have 3 programs that I have set to open when I boot Kubuntu 20.04.
    Is there a way to set in which order they boot?
    Greg
    W9WD

    #2
    Maybe try chaining them using "&&" assuming we're talking about after logging in as opposed to actual booting?
    Kubuntu 20.04

    Comment


      #3
      Not quite sure what you mean by "&&" ?
      Greg
      W9WD

      Comment


        #4
        You want to create a script that runs the programs in a certain order. Usiong '&&' between the commands basically does this, however it will wait for the first app,lication to finish running (ie it will need to be closed) before opening the next- runs one thing, then the other in that specific order.

        Using a single '&' will work for this, as it runs things in order, without needing them to finish/close.

        However, some applications open much faster than others, so simple sleep commands can be used if needed



        This would be a very simple script to make.

        Open Kate or Kwrite

        add this to the text file:

        Code:
        #!/bin/bash
        
        command1 &
        sleep 3
        command2 &
        sleep 3
        command3

        Substitute the name of the command/program in each place. You can find the name of the command if you right click on the item's menu entry, and use the "edit Application" to discover the command name used. Ignore anything like '%f' etc.

        Save the file somewhere, doesn't matter the location. Name it something like 'my-fancy-script-I-made-myself.sh', or any short, easy-to remember name.

        You will need to right click on the file, and make sure to set the file as executable Properties >> Permissions

        Simply double click the file to test.

        If necessary, the sleep figure can be tweaked if needed, or even tested without using it at all.
        Once it works to your liking, use system settings Auto-start to add a new script.


        Here is a quick example I used for Openshot video editor (slowest to load) , Kate, and Spotify, in order.


        Code:
        #!/bin/bash
        
        openshot-qt &
        sleep 2
        kate &
        sleep 1
        spotify
        Without the sleep, they do not open in the desired order.

        Comment


          #5
          I think I am getting what you mean....

          The order I would prefer is
          Thunderbird &
          sleep 2
          Firefox &
          sleep 1
          Kate
          Greg
          W9WD

          Comment


            #6
            Here is what I wound up with and it works

            #!/bin/bash

            thunderbird &
            sleep 3
            firefox &
            sleep 3
            kate &
            Greg
            W9WD

            Comment


              #7
              Nice!

              The beauty is being able to tweak it to just the way you like it.

              Comment


                #8
                ^^^ my safety net in action
                Kubuntu 20.04

                Comment


                  #9
                  When I started up this morning it was not in the autostart program.
                  I looked for a way to save it but could not find one.
                  File works fine, it just wasn't there.
                  I clicked on it and it took right off.

                  What did I not do right?
                  Greg
                  W9WD

                  Comment


                    #10
                    Today it worked?
                    Weird.

                    Thanks guys
                    Greg
                    W9WD

                    Comment


                      #11
                      Couldn't he just list his startup programs in: System Settings ⇒ Startup and Shutdown ⇒ Autostart

                      Or use the Stacer utility?
                      Kubuntu 22.04 (desktop & laptop), Windows 7 &2K (via VirtualBox on desktop PC)
                      ================================

                      Comment

                      Working...
                      X