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

5
  • 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. – Dec 22, 2018 at 1:38
  • 1
    It tells us if you are running X or Wayland. See man echo.
    – user535733
    Dec 22, 2018 at 3:32
  • x11. – it give me this what is the different can you tell me please i'm new ubuntu user Dec 22, 2018 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, 2018 at 5:32
  • ok can you please help me on just run this command on startup thanks Dec 22, 2018 at 6:15

2 Answers 2

3

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 :)
2
  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.
0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .