How do I run a command at start up on Ubuntu 18.04 LTS?
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:
18.04 autostart startup-applications
add a comment |
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:
18.04 autostart startup-applications
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. Seeman 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
add a comment |
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:
18.04 autostart startup-applications
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:
18.04 autostart startup-applications
18.04 autostart startup-applications
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. Seeman 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
add a comment |
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. Seeman 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
add a comment |
2 Answers
2
active
oldest
votes
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.
- Make the script executable (refer to this).
- In Startup Applications, while editing the program, click Browse... next to the 'Command' textbox and select the
set-xgamma.sh
file you just created.
add a comment |
Thanks, pomsky
I have found a way to make it after doing
these steps
- Create a new text file, say
set-xgamma.sh
somewhere
add the following lines to the file:
#!/bin/bash
sleep 7
xgamma -gamma 0.70
and save the file.
Make the script executable.
- use this command
crontab -e
- put
@reboot sh $HOME/set-gamma.sh &
there with your file path - save it by clicking ctrl+o then ctrl+x to exit and it works :)
add a comment |
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
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
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.
- Make the script executable (refer to this).
- In Startup Applications, while editing the program, click Browse... next to the 'Command' textbox and select the
set-xgamma.sh
file you just created.
add a comment |
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.
- Make the script executable (refer to this).
- In Startup Applications, while editing the program, click Browse... next to the 'Command' textbox and select the
set-xgamma.sh
file you just created.
add a comment |
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.
- Make the script executable (refer to this).
- In Startup Applications, while editing the program, click Browse... next to the 'Command' textbox and select the
set-xgamma.sh
file you just created.
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.
- Make the script executable (refer to this).
- In Startup Applications, while editing the program, click Browse... next to the 'Command' textbox and select the
set-xgamma.sh
file you just created.
answered Dec 22 '18 at 11:24
pomsky
28.8k1188115
28.8k1188115
add a comment |
add a comment |
Thanks, pomsky
I have found a way to make it after doing
these steps
- Create a new text file, say
set-xgamma.sh
somewhere
add the following lines to the file:
#!/bin/bash
sleep 7
xgamma -gamma 0.70
and save the file.
Make the script executable.
- use this command
crontab -e
- put
@reboot sh $HOME/set-gamma.sh &
there with your file path - save it by clicking ctrl+o then ctrl+x to exit and it works :)
add a comment |
Thanks, pomsky
I have found a way to make it after doing
these steps
- Create a new text file, say
set-xgamma.sh
somewhere
add the following lines to the file:
#!/bin/bash
sleep 7
xgamma -gamma 0.70
and save the file.
Make the script executable.
- use this command
crontab -e
- put
@reboot sh $HOME/set-gamma.sh &
there with your file path - save it by clicking ctrl+o then ctrl+x to exit and it works :)
add a comment |
Thanks, pomsky
I have found a way to make it after doing
these steps
- Create a new text file, say
set-xgamma.sh
somewhere
add the following lines to the file:
#!/bin/bash
sleep 7
xgamma -gamma 0.70
and save the file.
Make the script executable.
- use this command
crontab -e
- put
@reboot sh $HOME/set-gamma.sh &
there with your file path - save it by clicking ctrl+o then ctrl+x to exit and it works :)
Thanks, pomsky
I have found a way to make it after doing
these steps
- Create a new text file, say
set-xgamma.sh
somewhere
add the following lines to the file:
#!/bin/bash
sleep 7
xgamma -gamma 0.70
and save the file.
Make the script executable.
- use this command
crontab -e
- put
@reboot sh $HOME/set-gamma.sh &
there with your file path - save it by clicking ctrl+o then ctrl+x to exit and it works :)
edited Dec 23 '18 at 18:47
pomsky
28.8k1188115
28.8k1188115
answered Dec 23 '18 at 18:32
Silver-Coder
114
114
add a comment |
add a comment |
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.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
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