How do I run a command at start up on Ubuntu 18.04 LTS?












1














I need to start a command on startup. I want to run this command:



xgamma -gamma 0.70


I have used Startup Applications but it doesn't work. I have put the command in the Startup Applications:



Startup application










share|improve this question
























  • yes sorry i have put the same command in the start up i will take another screenshot of how it looks thanks and what is this command do echo $XDG_SESSION_TYPE. –
    – Silver-Coder
    Dec 22 '18 at 1:38






  • 1




    It tells us if you are running X or Wayland. See man echo.
    – user535733
    Dec 22 '18 at 3:32












  • x11. – it give me this what is the different can you tell me please i'm new ubuntu user
    – Silver-Coder
    Dec 22 '18 at 4:06






  • 1




    Comments are not intended for conversation, but to help you improve your question. AskUbuntu's format is Question/Answer, not discussion. If you wish to discuss side issues ("say, what does this mean?"), then consider opening a thread at our sibling site ubuntuforums.org, which IS converstional, and does have threads that wander.
    – user535733
    Dec 22 '18 at 5:32










  • ok can you please help me on just run this command on startup thanks
    – Silver-Coder
    Dec 22 '18 at 6:15
















1














I need to start a command on startup. I want to run this command:



xgamma -gamma 0.70


I have used Startup Applications but it doesn't work. I have put the command in the Startup Applications:



Startup application










share|improve this question
























  • yes sorry i have put the same command in the start up i will take another screenshot of how it looks thanks and what is this command do echo $XDG_SESSION_TYPE. –
    – Silver-Coder
    Dec 22 '18 at 1:38






  • 1




    It tells us if you are running X or Wayland. See man echo.
    – user535733
    Dec 22 '18 at 3:32












  • x11. – it give me this what is the different can you tell me please i'm new ubuntu user
    – Silver-Coder
    Dec 22 '18 at 4:06






  • 1




    Comments are not intended for conversation, but to help you improve your question. AskUbuntu's format is Question/Answer, not discussion. If you wish to discuss side issues ("say, what does this mean?"), then consider opening a thread at our sibling site ubuntuforums.org, which IS converstional, and does have threads that wander.
    – user535733
    Dec 22 '18 at 5:32










  • ok can you please help me on just run this command on startup thanks
    – Silver-Coder
    Dec 22 '18 at 6:15














1












1








1


2





I need to start a command on startup. I want to run this command:



xgamma -gamma 0.70


I have used Startup Applications but it doesn't work. I have put the command in the Startup Applications:



Startup application










share|improve this question















I need to start a command on startup. I want to run this command:



xgamma -gamma 0.70


I have used Startup Applications but it doesn't work. I have put the command in the Startup Applications:



Startup application







18.04 autostart startup-applications






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Dec 22 '18 at 11:19









pomsky

28.8k1188115




28.8k1188115










asked Dec 22 '18 at 1:21









Silver-Coder

114




114












  • yes sorry i have put the same command in the start up i will take another screenshot of how it looks thanks and what is this command do echo $XDG_SESSION_TYPE. –
    – Silver-Coder
    Dec 22 '18 at 1:38






  • 1




    It tells us if you are running X or Wayland. See man echo.
    – user535733
    Dec 22 '18 at 3:32












  • x11. – it give me this what is the different can you tell me please i'm new ubuntu user
    – Silver-Coder
    Dec 22 '18 at 4:06






  • 1




    Comments are not intended for conversation, but to help you improve your question. AskUbuntu's format is Question/Answer, not discussion. If you wish to discuss side issues ("say, what does this mean?"), then consider opening a thread at our sibling site ubuntuforums.org, which IS converstional, and does have threads that wander.
    – user535733
    Dec 22 '18 at 5:32










  • ok can you please help me on just run this command on startup thanks
    – Silver-Coder
    Dec 22 '18 at 6:15


















  • yes sorry i have put the same command in the start up i will take another screenshot of how it looks thanks and what is this command do echo $XDG_SESSION_TYPE. –
    – Silver-Coder
    Dec 22 '18 at 1:38






  • 1




    It tells us if you are running X or Wayland. See man echo.
    – user535733
    Dec 22 '18 at 3:32












  • x11. – it give me this what is the different can you tell me please i'm new ubuntu user
    – Silver-Coder
    Dec 22 '18 at 4:06






  • 1




    Comments are not intended for conversation, but to help you improve your question. AskUbuntu's format is Question/Answer, not discussion. If you wish to discuss side issues ("say, what does this mean?"), then consider opening a thread at our sibling site ubuntuforums.org, which IS converstional, and does have threads that wander.
    – user535733
    Dec 22 '18 at 5:32










  • ok can you please help me on just run this command on startup thanks
    – Silver-Coder
    Dec 22 '18 at 6:15
















yes sorry i have put the same command in the start up i will take another screenshot of how it looks thanks and what is this command do echo $XDG_SESSION_TYPE. –
– Silver-Coder
Dec 22 '18 at 1:38




yes sorry i have put the same command in the start up i will take another screenshot of how it looks thanks and what is this command do echo $XDG_SESSION_TYPE. –
– Silver-Coder
Dec 22 '18 at 1:38




1




1




It tells us if you are running X or Wayland. See man echo.
– user535733
Dec 22 '18 at 3:32






It tells us if you are running X or Wayland. See man echo.
– user535733
Dec 22 '18 at 3:32














x11. – it give me this what is the different can you tell me please i'm new ubuntu user
– Silver-Coder
Dec 22 '18 at 4:06




x11. – it give me this what is the different can you tell me please i'm new ubuntu user
– Silver-Coder
Dec 22 '18 at 4:06




1




1




Comments are not intended for conversation, but to help you improve your question. AskUbuntu's format is Question/Answer, not discussion. If you wish to discuss side issues ("say, what does this mean?"), then consider opening a thread at our sibling site ubuntuforums.org, which IS converstional, and does have threads that wander.
– user535733
Dec 22 '18 at 5:32




Comments are not intended for conversation, but to help you improve your question. AskUbuntu's format is Question/Answer, not discussion. If you wish to discuss side issues ("say, what does this mean?"), then consider opening a thread at our sibling site ubuntuforums.org, which IS converstional, and does have threads that wander.
– user535733
Dec 22 '18 at 5:32












ok can you please help me on just run this command on startup thanks
– Silver-Coder
Dec 22 '18 at 6:15




ok can you please help me on just run this command on startup thanks
– Silver-Coder
Dec 22 '18 at 6:15










2 Answers
2






active

oldest

votes


















0
















  1. Create a shell script for the command. Create a new text file, say set-xgamma.sh somewhere and add the following lines to the file:



    #!/bin/bash
    xgamma -gamma 0.70


    and save the file.



  2. Make the script executable (refer to this).

  3. In Startup Applications, while editing the program, click Browse... next to the 'Command' textbox and select the set-xgamma.sh file you just created.






share|improve this answer





























    0














    Thanks, pomsky
    I have found a way to make it after doing
    these steps




    1. Create a new text file, say set-xgamma.sh somewhere


    2. add the following lines to the file:



      #!/bin/bash
      sleep 7
      xgamma -gamma 0.70


      and save the file.



    3. Make the script executable.


    4. use this command crontab -e

    5. put @reboot sh $HOME/set-gamma.sh & there with your file path

    6. save it by clicking ctrl+o then ctrl+x to exit and it works :)






    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%2f1103715%2fhow-do-i-run-a-command-at-start-up-on-ubuntu-18-04-lts%23new-answer', 'question_page');
      }
      );

      Post as a guest















      Required, but never shown

























      2 Answers
      2






      active

      oldest

      votes








      2 Answers
      2






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes









      0
















      1. Create a shell script for the command. Create a new text file, say set-xgamma.sh somewhere and add the following lines to the file:



        #!/bin/bash
        xgamma -gamma 0.70


        and save the file.



      2. Make the script executable (refer to this).

      3. In Startup Applications, while editing the program, click Browse... next to the 'Command' textbox and select the set-xgamma.sh file you just created.






      share|improve this answer


























        0
















        1. Create a shell script for the command. Create a new text file, say set-xgamma.sh somewhere and add the following lines to the file:



          #!/bin/bash
          xgamma -gamma 0.70


          and save the file.



        2. Make the script executable (refer to this).

        3. In Startup Applications, while editing the program, click Browse... next to the 'Command' textbox and select the set-xgamma.sh file you just created.






        share|improve this answer
























          0












          0








          0








          1. Create a shell script for the command. Create a new text file, say set-xgamma.sh somewhere and add the following lines to the file:



            #!/bin/bash
            xgamma -gamma 0.70


            and save the file.



          2. Make the script executable (refer to this).

          3. In Startup Applications, while editing the program, click Browse... next to the 'Command' textbox and select the set-xgamma.sh file you just created.






          share|improve this answer














          1. Create a shell script for the command. Create a new text file, say set-xgamma.sh somewhere and add the following lines to the file:



            #!/bin/bash
            xgamma -gamma 0.70


            and save the file.



          2. Make the script executable (refer to this).

          3. In Startup Applications, while editing the program, click Browse... next to the 'Command' textbox and select the set-xgamma.sh file you just created.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Dec 22 '18 at 11:24









          pomsky

          28.8k1188115




          28.8k1188115

























              0














              Thanks, pomsky
              I have found a way to make it after doing
              these steps




              1. Create a new text file, say set-xgamma.sh somewhere


              2. add the following lines to the file:



                #!/bin/bash
                sleep 7
                xgamma -gamma 0.70


                and save the file.



              3. Make the script executable.


              4. use this command crontab -e

              5. put @reboot sh $HOME/set-gamma.sh & there with your file path

              6. save it by clicking ctrl+o then ctrl+x to exit and it works :)






              share|improve this answer




























                0














                Thanks, pomsky
                I have found a way to make it after doing
                these steps




                1. Create a new text file, say set-xgamma.sh somewhere


                2. add the following lines to the file:



                  #!/bin/bash
                  sleep 7
                  xgamma -gamma 0.70


                  and save the file.



                3. Make the script executable.


                4. use this command crontab -e

                5. put @reboot sh $HOME/set-gamma.sh & there with your file path

                6. save it by clicking ctrl+o then ctrl+x to exit and it works :)






                share|improve this answer


























                  0












                  0








                  0






                  Thanks, pomsky
                  I have found a way to make it after doing
                  these steps




                  1. Create a new text file, say set-xgamma.sh somewhere


                  2. add the following lines to the file:



                    #!/bin/bash
                    sleep 7
                    xgamma -gamma 0.70


                    and save the file.



                  3. Make the script executable.


                  4. use this command crontab -e

                  5. put @reboot sh $HOME/set-gamma.sh & there with your file path

                  6. save it by clicking ctrl+o then ctrl+x to exit and it works :)






                  share|improve this answer














                  Thanks, pomsky
                  I have found a way to make it after doing
                  these steps




                  1. Create a new text file, say set-xgamma.sh somewhere


                  2. add the following lines to the file:



                    #!/bin/bash
                    sleep 7
                    xgamma -gamma 0.70


                    and save the file.



                  3. Make the script executable.


                  4. use this command crontab -e

                  5. put @reboot sh $HOME/set-gamma.sh & there with your file path

                  6. save it by clicking ctrl+o then ctrl+x to exit and it works :)







                  share|improve this answer














                  share|improve this answer



                  share|improve this answer








                  edited Dec 23 '18 at 18:47









                  pomsky

                  28.8k1188115




                  28.8k1188115










                  answered Dec 23 '18 at 18:32









                  Silver-Coder

                  114




                  114






























                      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.





                      Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


                      Please pay close attention to the following guidance:


                      • 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%2f1103715%2fhow-do-i-run-a-command-at-start-up-on-ubuntu-18-04-lts%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

                      flock() on closed filehandle LOCK_FILE at /usr/bin/apt-mirror

                      Mangá

                      Eduardo VII do Reino Unido