I need to run a one line startup script under gnome and systemd

Clash Royale CLAN TAG#URR8PPP
nvidia-settings -a [gpu:0]/GPUPowerMizerMode=1
now what is the easiest way to run this one bash line of code at startup???
I am running Gnome 3.14.
linux gnome gnome3 systemd init-script
add a comment |
nvidia-settings -a [gpu:0]/GPUPowerMizerMode=1
now what is the easiest way to run this one bash line of code at startup???
I am running Gnome 3.14.
linux gnome gnome3 systemd init-script
add a comment |
nvidia-settings -a [gpu:0]/GPUPowerMizerMode=1
now what is the easiest way to run this one bash line of code at startup???
I am running Gnome 3.14.
linux gnome gnome3 systemd init-script
nvidia-settings -a [gpu:0]/GPUPowerMizerMode=1
now what is the easiest way to run this one bash line of code at startup???
I am running Gnome 3.14.
linux gnome gnome3 systemd init-script
linux gnome gnome3 systemd init-script
asked Dec 10 '14 at 3:08
DerekDerek
1033
1033
add a comment |
add a comment |
3 Answers
3
active
oldest
votes
You can use gnome-session-properties in terminal or using Alt+F2.
That opens up Startup Applications Preferences in my Linux Mint (could be different for your distro).
Give a name for your command (optional)
Write the bash code in Command option
Add any comment (optional)
Alternatively, you could give a command to execute a bash file (which contains your code) in the commands option.
UPDATE: As notified by don_crissti you have to use gnome-tweak-tool instead. I'm guessing it still has similar options.
1
don is right, but I downloaded it from the aur and everything worked out fine thank you!
– Derek
Dec 10 '14 at 3:34
add a comment |
If you want to do it with systemd you create a service file as follows:
[Unit]
Description=Execute some nvidia command
[Service]
Type=oneshot
ExecStart=nvidia-settings -a [gpu:0]/GPUPowerMizerMode=1
[Install]
WantedBy=graphical.target
You should save this file with a .service suffix ~/.config/systemd/user/ and enable it with systemctl --user enable filename.service. This way every time you start your session the command will be run. You may add some options to avoid it being run more than once per boot or adjust dependencies so it's executed earlier in the boot process.
Check for problems and status with systemctl status filename.service.
add a comment |
Add this line to /etc/rc.local before exit 0 this will the same when system starts.
I don't have an rc.local file in /etc
– Derek
Dec 10 '14 at 20:49
which Operating system u r using?
– Security Beast
Dec 11 '14 at 9:57
Arch Linux x86_64 - 3.17.6
– Derek
Dec 11 '14 at 23:00
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
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: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
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%2funix.stackexchange.com%2fquestions%2f172451%2fi-need-to-run-a-one-line-startup-script-under-gnome-and-systemd%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
You can use gnome-session-properties in terminal or using Alt+F2.
That opens up Startup Applications Preferences in my Linux Mint (could be different for your distro).
Give a name for your command (optional)
Write the bash code in Command option
Add any comment (optional)
Alternatively, you could give a command to execute a bash file (which contains your code) in the commands option.
UPDATE: As notified by don_crissti you have to use gnome-tweak-tool instead. I'm guessing it still has similar options.
1
don is right, but I downloaded it from the aur and everything worked out fine thank you!
– Derek
Dec 10 '14 at 3:34
add a comment |
You can use gnome-session-properties in terminal or using Alt+F2.
That opens up Startup Applications Preferences in my Linux Mint (could be different for your distro).
Give a name for your command (optional)
Write the bash code in Command option
Add any comment (optional)
Alternatively, you could give a command to execute a bash file (which contains your code) in the commands option.
UPDATE: As notified by don_crissti you have to use gnome-tweak-tool instead. I'm guessing it still has similar options.
1
don is right, but I downloaded it from the aur and everything worked out fine thank you!
– Derek
Dec 10 '14 at 3:34
add a comment |
You can use gnome-session-properties in terminal or using Alt+F2.
That opens up Startup Applications Preferences in my Linux Mint (could be different for your distro).
Give a name for your command (optional)
Write the bash code in Command option
Add any comment (optional)
Alternatively, you could give a command to execute a bash file (which contains your code) in the commands option.
UPDATE: As notified by don_crissti you have to use gnome-tweak-tool instead. I'm guessing it still has similar options.
You can use gnome-session-properties in terminal or using Alt+F2.
That opens up Startup Applications Preferences in my Linux Mint (could be different for your distro).
Give a name for your command (optional)
Write the bash code in Command option
Add any comment (optional)
Alternatively, you could give a command to execute a bash file (which contains your code) in the commands option.
UPDATE: As notified by don_crissti you have to use gnome-tweak-tool instead. I'm guessing it still has similar options.
edited Dec 10 '14 at 4:03
HalosGhost
3,75392236
3,75392236
answered Dec 10 '14 at 3:23
onkar406onkar406
1213
1213
1
don is right, but I downloaded it from the aur and everything worked out fine thank you!
– Derek
Dec 10 '14 at 3:34
add a comment |
1
don is right, but I downloaded it from the aur and everything worked out fine thank you!
– Derek
Dec 10 '14 at 3:34
1
1
don is right, but I downloaded it from the aur and everything worked out fine thank you!
– Derek
Dec 10 '14 at 3:34
don is right, but I downloaded it from the aur and everything worked out fine thank you!
– Derek
Dec 10 '14 at 3:34
add a comment |
If you want to do it with systemd you create a service file as follows:
[Unit]
Description=Execute some nvidia command
[Service]
Type=oneshot
ExecStart=nvidia-settings -a [gpu:0]/GPUPowerMizerMode=1
[Install]
WantedBy=graphical.target
You should save this file with a .service suffix ~/.config/systemd/user/ and enable it with systemctl --user enable filename.service. This way every time you start your session the command will be run. You may add some options to avoid it being run more than once per boot or adjust dependencies so it's executed earlier in the boot process.
Check for problems and status with systemctl status filename.service.
add a comment |
If you want to do it with systemd you create a service file as follows:
[Unit]
Description=Execute some nvidia command
[Service]
Type=oneshot
ExecStart=nvidia-settings -a [gpu:0]/GPUPowerMizerMode=1
[Install]
WantedBy=graphical.target
You should save this file with a .service suffix ~/.config/systemd/user/ and enable it with systemctl --user enable filename.service. This way every time you start your session the command will be run. You may add some options to avoid it being run more than once per boot or adjust dependencies so it's executed earlier in the boot process.
Check for problems and status with systemctl status filename.service.
add a comment |
If you want to do it with systemd you create a service file as follows:
[Unit]
Description=Execute some nvidia command
[Service]
Type=oneshot
ExecStart=nvidia-settings -a [gpu:0]/GPUPowerMizerMode=1
[Install]
WantedBy=graphical.target
You should save this file with a .service suffix ~/.config/systemd/user/ and enable it with systemctl --user enable filename.service. This way every time you start your session the command will be run. You may add some options to avoid it being run more than once per boot or adjust dependencies so it's executed earlier in the boot process.
Check for problems and status with systemctl status filename.service.
If you want to do it with systemd you create a service file as follows:
[Unit]
Description=Execute some nvidia command
[Service]
Type=oneshot
ExecStart=nvidia-settings -a [gpu:0]/GPUPowerMizerMode=1
[Install]
WantedBy=graphical.target
You should save this file with a .service suffix ~/.config/systemd/user/ and enable it with systemctl --user enable filename.service. This way every time you start your session the command will be run. You may add some options to avoid it being run more than once per boot or adjust dependencies so it's executed earlier in the boot process.
Check for problems and status with systemctl status filename.service.
answered Feb 4 '15 at 8:25
miguelbernadimiguelbernadi
33114
33114
add a comment |
add a comment |
Add this line to /etc/rc.local before exit 0 this will the same when system starts.
I don't have an rc.local file in /etc
– Derek
Dec 10 '14 at 20:49
which Operating system u r using?
– Security Beast
Dec 11 '14 at 9:57
Arch Linux x86_64 - 3.17.6
– Derek
Dec 11 '14 at 23:00
add a comment |
Add this line to /etc/rc.local before exit 0 this will the same when system starts.
I don't have an rc.local file in /etc
– Derek
Dec 10 '14 at 20:49
which Operating system u r using?
– Security Beast
Dec 11 '14 at 9:57
Arch Linux x86_64 - 3.17.6
– Derek
Dec 11 '14 at 23:00
add a comment |
Add this line to /etc/rc.local before exit 0 this will the same when system starts.
Add this line to /etc/rc.local before exit 0 this will the same when system starts.
answered Dec 10 '14 at 12:58
Security BeastSecurity Beast
752512
752512
I don't have an rc.local file in /etc
– Derek
Dec 10 '14 at 20:49
which Operating system u r using?
– Security Beast
Dec 11 '14 at 9:57
Arch Linux x86_64 - 3.17.6
– Derek
Dec 11 '14 at 23:00
add a comment |
I don't have an rc.local file in /etc
– Derek
Dec 10 '14 at 20:49
which Operating system u r using?
– Security Beast
Dec 11 '14 at 9:57
Arch Linux x86_64 - 3.17.6
– Derek
Dec 11 '14 at 23:00
I don't have an rc.local file in /etc
– Derek
Dec 10 '14 at 20:49
I don't have an rc.local file in /etc
– Derek
Dec 10 '14 at 20:49
which Operating system u r using?
– Security Beast
Dec 11 '14 at 9:57
which Operating system u r using?
– Security Beast
Dec 11 '14 at 9:57
Arch Linux x86_64 - 3.17.6
– Derek
Dec 11 '14 at 23:00
Arch Linux x86_64 - 3.17.6
– Derek
Dec 11 '14 at 23:00
add a comment |
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- 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%2funix.stackexchange.com%2fquestions%2f172451%2fi-need-to-run-a-one-line-startup-script-under-gnome-and-systemd%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