Unable to execute two commands in Startup ApplicationsWhere did the startup-applications-preferences program go?Brightness control command on “startup Applications” is not workingKDE - run particular commands in particular workspace at startupSyndaemon won't start as startup applicationAdd script to System -> Preferences -> Startup Applications“Startup Applications” not workingRight markup for Startup Applications scriptDropbox disappears from Startup Applications upon reboot in Ubuntu 16.04Script in Startup Applications Not Running in Ubuntu 18.10, but was in Linux Mint 19.1Unable to close 'Applications' after update to 19.04
Why do galaxies collide?
Capital gains on stocks sold to take initial investment off the table
Omit property variable when using object destructuring
What kind of action are dodge and disengage?
How come Arya Stark didn't burn in Game of Thrones Season 8 Episode 5
When did Britain learn about American independence?
Is Precocious Apprentice enough for Mystic Theurge?
What do astronauts do with their trash on the ISS?
Is it possible to pass a pointer to an operator as an argument like a pointer to a function?
"Counterexample" for the Inverse function theorem
What kind of environment would favor hermaphroditism in a sentient species over regular, old sexes?
Have there been any examples of re-usable rockets in the past?
Why did the soldiers of the North disobey Jon?
Why doesn't Iron Man's action affect this person in Endgame?
How can I safely determine the output voltage and current of a transformer?
Failing students when it might cause them economic ruin
What is this rubber on gear cables
refer string as a field API name
Single word that parallels "Recent" when discussing the near future
Do we see some Unsullied doing this in S08E05?
Can a person still be an Orthodox Jew and believe that the Torah contains narratives that are not scientifically correct?
Is it standard to have the first week's pay indefinitely withheld?
A person lacking money who shows off a lot
How to know the path of a particular software?
Unable to execute two commands in Startup Applications
Where did the startup-applications-preferences program go?Brightness control command on “startup Applications” is not workingKDE - run particular commands in particular workspace at startupSyndaemon won't start as startup applicationAdd script to System -> Preferences -> Startup Applications“Startup Applications” not workingRight markup for Startup Applications scriptDropbox disappears from Startup Applications upon reboot in Ubuntu 16.04Script in Startup Applications Not Running in Ubuntu 18.10, but was in Linux Mint 19.1Unable to close 'Applications' after update to 19.04
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
I was using indicator-stickynotes
command in Startup applications which worked fine. I modified it to sleep 30;indicator-sticknotes
. I read this in different articles and even on this site. But this isn't working for mine.
It was like:
I modified it to:
19.04 startup-applications
add a comment |
I was using indicator-stickynotes
command in Startup applications which worked fine. I modified it to sleep 30;indicator-sticknotes
. I read this in different articles and even on this site. But this isn't working for mine.
It was like:
I modified it to:
19.04 startup-applications
1
I think you have enough reputation on this site to use the image uploading facility by clicking on the image icon about the area for composing your question or answer. Doing so, will display your images correctly.
– DK Bose
May 11 at 13:42
@DKBose i don't want to annoy the people by making the post length, so... i did that.
– Prabesh Bhattarai
May 11 at 14:19
2
@PrabeshBhattarai There's nothing like annoying people with length of the post. We hate length of post when they include irrelevant statements like: I am new to Linux, I know nothing about it. Please help. I don't know what to do, etc.. There are many posts which are of more than 1000 words but they contain relevant details.
– Kulfy
May 11 at 14:23
add a comment |
I was using indicator-stickynotes
command in Startup applications which worked fine. I modified it to sleep 30;indicator-sticknotes
. I read this in different articles and even on this site. But this isn't working for mine.
It was like:
I modified it to:
19.04 startup-applications
I was using indicator-stickynotes
command in Startup applications which worked fine. I modified it to sleep 30;indicator-sticknotes
. I read this in different articles and even on this site. But this isn't working for mine.
It was like:
I modified it to:
19.04 startup-applications
19.04 startup-applications
edited May 11 at 14:28
Kulfy
6,06372449
6,06372449
asked May 11 at 13:20
Prabesh BhattaraiPrabesh Bhattarai
3139
3139
1
I think you have enough reputation on this site to use the image uploading facility by clicking on the image icon about the area for composing your question or answer. Doing so, will display your images correctly.
– DK Bose
May 11 at 13:42
@DKBose i don't want to annoy the people by making the post length, so... i did that.
– Prabesh Bhattarai
May 11 at 14:19
2
@PrabeshBhattarai There's nothing like annoying people with length of the post. We hate length of post when they include irrelevant statements like: I am new to Linux, I know nothing about it. Please help. I don't know what to do, etc.. There are many posts which are of more than 1000 words but they contain relevant details.
– Kulfy
May 11 at 14:23
add a comment |
1
I think you have enough reputation on this site to use the image uploading facility by clicking on the image icon about the area for composing your question or answer. Doing so, will display your images correctly.
– DK Bose
May 11 at 13:42
@DKBose i don't want to annoy the people by making the post length, so... i did that.
– Prabesh Bhattarai
May 11 at 14:19
2
@PrabeshBhattarai There's nothing like annoying people with length of the post. We hate length of post when they include irrelevant statements like: I am new to Linux, I know nothing about it. Please help. I don't know what to do, etc.. There are many posts which are of more than 1000 words but they contain relevant details.
– Kulfy
May 11 at 14:23
1
1
I think you have enough reputation on this site to use the image uploading facility by clicking on the image icon about the area for composing your question or answer. Doing so, will display your images correctly.
– DK Bose
May 11 at 13:42
I think you have enough reputation on this site to use the image uploading facility by clicking on the image icon about the area for composing your question or answer. Doing so, will display your images correctly.
– DK Bose
May 11 at 13:42
@DKBose i don't want to annoy the people by making the post length, so... i did that.
– Prabesh Bhattarai
May 11 at 14:19
@DKBose i don't want to annoy the people by making the post length, so... i did that.
– Prabesh Bhattarai
May 11 at 14:19
2
2
@PrabeshBhattarai There's nothing like annoying people with length of the post. We hate length of post when they include irrelevant statements like: I am new to Linux, I know nothing about it. Please help. I don't know what to do, etc.. There are many posts which are of more than 1000 words but they contain relevant details.
– Kulfy
May 11 at 14:23
@PrabeshBhattarai There's nothing like annoying people with length of the post. We hate length of post when they include irrelevant statements like: I am new to Linux, I know nothing about it. Please help. I don't know what to do, etc.. There are many posts which are of more than 1000 words but they contain relevant details.
– Kulfy
May 11 at 14:23
add a comment |
1 Answer
1
active
oldest
votes
Whenever startup applications are defined, it creates a desktop entry in ~/.config/autostart. So, it's a desktop entry which is responsible for launching an application at startup.
On a typical command line (terminal) you can use one of the following to execute two commands.
sleep 30; indicator-stickynotes
sleep 30 && indicator-stickynotes
sleep 30 & indicator-stickynotes
But desktop entries are very much different from the command line. According to Desktop Entry Specification:
The Exec key
The Exec key must contain a command line. A command line consists of an executable program optionally followed by one or more arguments.
Therefore only one command can be used in Desktop entries. Since you are using two commands, it'll eventually result in errors. Either desktop entry will fail to launch the application or the second command will be considered as an argument to the first command.
You can use sh/bash as a command for this, like:
sh -c "sleep 30; indicator-stickynotes"
As pointed out by ElementW in one of their comment, sleep 30; exec indicator-stickynotes
would save a little memory and a PID, since sh is otherwise only waiting on indicator-stickynotes, its child process, to terminate, and serves no other purpose.
1
sleep 30; exec indicator-stickynotes
would save a little memory and a PID, sincesh
is otherwise only waiting onindicator-stickynotes
, its child process, to terminate, and serves no other purpose.
– ElementW
May 11 at 16:48
@Kulfy Insh -c
, obviously, since 1. I mentionsh
would be waiting and 2.exec
is a shell built-in and.desktop
files launch processes, not shell command lines. Also,exec
, notenv
, which is essentially a no-op when called with no args within a shell.
– ElementW
May 11 at 18:31
@ElementW Your command: sh -c "sleep 18; exec indicator-stickynotes" also work. I just tried it on mine.
– Prabesh Bhattarai
May 11 at 23:45
@ElementW I was little bit sleepy while writing the comment. I mistyped exec as env :-P. By the way thank you for pointing out that. That was a fair point. I've added what you said in my answer :)
– Kulfy
May 12 at 4:12
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%2f1142396%2funable-to-execute-two-commands-in-startup-applications%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Whenever startup applications are defined, it creates a desktop entry in ~/.config/autostart. So, it's a desktop entry which is responsible for launching an application at startup.
On a typical command line (terminal) you can use one of the following to execute two commands.
sleep 30; indicator-stickynotes
sleep 30 && indicator-stickynotes
sleep 30 & indicator-stickynotes
But desktop entries are very much different from the command line. According to Desktop Entry Specification:
The Exec key
The Exec key must contain a command line. A command line consists of an executable program optionally followed by one or more arguments.
Therefore only one command can be used in Desktop entries. Since you are using two commands, it'll eventually result in errors. Either desktop entry will fail to launch the application or the second command will be considered as an argument to the first command.
You can use sh/bash as a command for this, like:
sh -c "sleep 30; indicator-stickynotes"
As pointed out by ElementW in one of their comment, sleep 30; exec indicator-stickynotes
would save a little memory and a PID, since sh is otherwise only waiting on indicator-stickynotes, its child process, to terminate, and serves no other purpose.
1
sleep 30; exec indicator-stickynotes
would save a little memory and a PID, sincesh
is otherwise only waiting onindicator-stickynotes
, its child process, to terminate, and serves no other purpose.
– ElementW
May 11 at 16:48
@Kulfy Insh -c
, obviously, since 1. I mentionsh
would be waiting and 2.exec
is a shell built-in and.desktop
files launch processes, not shell command lines. Also,exec
, notenv
, which is essentially a no-op when called with no args within a shell.
– ElementW
May 11 at 18:31
@ElementW Your command: sh -c "sleep 18; exec indicator-stickynotes" also work. I just tried it on mine.
– Prabesh Bhattarai
May 11 at 23:45
@ElementW I was little bit sleepy while writing the comment. I mistyped exec as env :-P. By the way thank you for pointing out that. That was a fair point. I've added what you said in my answer :)
– Kulfy
May 12 at 4:12
add a comment |
Whenever startup applications are defined, it creates a desktop entry in ~/.config/autostart. So, it's a desktop entry which is responsible for launching an application at startup.
On a typical command line (terminal) you can use one of the following to execute two commands.
sleep 30; indicator-stickynotes
sleep 30 && indicator-stickynotes
sleep 30 & indicator-stickynotes
But desktop entries are very much different from the command line. According to Desktop Entry Specification:
The Exec key
The Exec key must contain a command line. A command line consists of an executable program optionally followed by one or more arguments.
Therefore only one command can be used in Desktop entries. Since you are using two commands, it'll eventually result in errors. Either desktop entry will fail to launch the application or the second command will be considered as an argument to the first command.
You can use sh/bash as a command for this, like:
sh -c "sleep 30; indicator-stickynotes"
As pointed out by ElementW in one of their comment, sleep 30; exec indicator-stickynotes
would save a little memory and a PID, since sh is otherwise only waiting on indicator-stickynotes, its child process, to terminate, and serves no other purpose.
1
sleep 30; exec indicator-stickynotes
would save a little memory and a PID, sincesh
is otherwise only waiting onindicator-stickynotes
, its child process, to terminate, and serves no other purpose.
– ElementW
May 11 at 16:48
@Kulfy Insh -c
, obviously, since 1. I mentionsh
would be waiting and 2.exec
is a shell built-in and.desktop
files launch processes, not shell command lines. Also,exec
, notenv
, which is essentially a no-op when called with no args within a shell.
– ElementW
May 11 at 18:31
@ElementW Your command: sh -c "sleep 18; exec indicator-stickynotes" also work. I just tried it on mine.
– Prabesh Bhattarai
May 11 at 23:45
@ElementW I was little bit sleepy while writing the comment. I mistyped exec as env :-P. By the way thank you for pointing out that. That was a fair point. I've added what you said in my answer :)
– Kulfy
May 12 at 4:12
add a comment |
Whenever startup applications are defined, it creates a desktop entry in ~/.config/autostart. So, it's a desktop entry which is responsible for launching an application at startup.
On a typical command line (terminal) you can use one of the following to execute two commands.
sleep 30; indicator-stickynotes
sleep 30 && indicator-stickynotes
sleep 30 & indicator-stickynotes
But desktop entries are very much different from the command line. According to Desktop Entry Specification:
The Exec key
The Exec key must contain a command line. A command line consists of an executable program optionally followed by one or more arguments.
Therefore only one command can be used in Desktop entries. Since you are using two commands, it'll eventually result in errors. Either desktop entry will fail to launch the application or the second command will be considered as an argument to the first command.
You can use sh/bash as a command for this, like:
sh -c "sleep 30; indicator-stickynotes"
As pointed out by ElementW in one of their comment, sleep 30; exec indicator-stickynotes
would save a little memory and a PID, since sh is otherwise only waiting on indicator-stickynotes, its child process, to terminate, and serves no other purpose.
Whenever startup applications are defined, it creates a desktop entry in ~/.config/autostart. So, it's a desktop entry which is responsible for launching an application at startup.
On a typical command line (terminal) you can use one of the following to execute two commands.
sleep 30; indicator-stickynotes
sleep 30 && indicator-stickynotes
sleep 30 & indicator-stickynotes
But desktop entries are very much different from the command line. According to Desktop Entry Specification:
The Exec key
The Exec key must contain a command line. A command line consists of an executable program optionally followed by one or more arguments.
Therefore only one command can be used in Desktop entries. Since you are using two commands, it'll eventually result in errors. Either desktop entry will fail to launch the application or the second command will be considered as an argument to the first command.
You can use sh/bash as a command for this, like:
sh -c "sleep 30; indicator-stickynotes"
As pointed out by ElementW in one of their comment, sleep 30; exec indicator-stickynotes
would save a little memory and a PID, since sh is otherwise only waiting on indicator-stickynotes, its child process, to terminate, and serves no other purpose.
edited May 12 at 4:11
answered May 11 at 13:42
KulfyKulfy
6,06372449
6,06372449
1
sleep 30; exec indicator-stickynotes
would save a little memory and a PID, sincesh
is otherwise only waiting onindicator-stickynotes
, its child process, to terminate, and serves no other purpose.
– ElementW
May 11 at 16:48
@Kulfy Insh -c
, obviously, since 1. I mentionsh
would be waiting and 2.exec
is a shell built-in and.desktop
files launch processes, not shell command lines. Also,exec
, notenv
, which is essentially a no-op when called with no args within a shell.
– ElementW
May 11 at 18:31
@ElementW Your command: sh -c "sleep 18; exec indicator-stickynotes" also work. I just tried it on mine.
– Prabesh Bhattarai
May 11 at 23:45
@ElementW I was little bit sleepy while writing the comment. I mistyped exec as env :-P. By the way thank you for pointing out that. That was a fair point. I've added what you said in my answer :)
– Kulfy
May 12 at 4:12
add a comment |
1
sleep 30; exec indicator-stickynotes
would save a little memory and a PID, sincesh
is otherwise only waiting onindicator-stickynotes
, its child process, to terminate, and serves no other purpose.
– ElementW
May 11 at 16:48
@Kulfy Insh -c
, obviously, since 1. I mentionsh
would be waiting and 2.exec
is a shell built-in and.desktop
files launch processes, not shell command lines. Also,exec
, notenv
, which is essentially a no-op when called with no args within a shell.
– ElementW
May 11 at 18:31
@ElementW Your command: sh -c "sleep 18; exec indicator-stickynotes" also work. I just tried it on mine.
– Prabesh Bhattarai
May 11 at 23:45
@ElementW I was little bit sleepy while writing the comment. I mistyped exec as env :-P. By the way thank you for pointing out that. That was a fair point. I've added what you said in my answer :)
– Kulfy
May 12 at 4:12
1
1
sleep 30; exec indicator-stickynotes
would save a little memory and a PID, since sh
is otherwise only waiting on indicator-stickynotes
, its child process, to terminate, and serves no other purpose.– ElementW
May 11 at 16:48
sleep 30; exec indicator-stickynotes
would save a little memory and a PID, since sh
is otherwise only waiting on indicator-stickynotes
, its child process, to terminate, and serves no other purpose.– ElementW
May 11 at 16:48
@Kulfy In
sh -c
, obviously, since 1. I mention sh
would be waiting and 2. exec
is a shell built-in and .desktop
files launch processes, not shell command lines. Also, exec
, not env
, which is essentially a no-op when called with no args within a shell.– ElementW
May 11 at 18:31
@Kulfy In
sh -c
, obviously, since 1. I mention sh
would be waiting and 2. exec
is a shell built-in and .desktop
files launch processes, not shell command lines. Also, exec
, not env
, which is essentially a no-op when called with no args within a shell.– ElementW
May 11 at 18:31
@ElementW Your command: sh -c "sleep 18; exec indicator-stickynotes" also work. I just tried it on mine.
– Prabesh Bhattarai
May 11 at 23:45
@ElementW Your command: sh -c "sleep 18; exec indicator-stickynotes" also work. I just tried it on mine.
– Prabesh Bhattarai
May 11 at 23:45
@ElementW I was little bit sleepy while writing the comment. I mistyped exec as env :-P. By the way thank you for pointing out that. That was a fair point. I've added what you said in my answer :)
– Kulfy
May 12 at 4:12
@ElementW I was little bit sleepy while writing the comment. I mistyped exec as env :-P. By the way thank you for pointing out that. That was a fair point. I've added what you said in my answer :)
– Kulfy
May 12 at 4:12
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.
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%2f1142396%2funable-to-execute-two-commands-in-startup-applications%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
1
I think you have enough reputation on this site to use the image uploading facility by clicking on the image icon about the area for composing your question or answer. Doing so, will display your images correctly.
– DK Bose
May 11 at 13:42
@DKBose i don't want to annoy the people by making the post length, so... i did that.
– Prabesh Bhattarai
May 11 at 14:19
2
@PrabeshBhattarai There's nothing like annoying people with length of the post. We hate length of post when they include irrelevant statements like: I am new to Linux, I know nothing about it. Please help. I don't know what to do, etc.. There are many posts which are of more than 1000 words but they contain relevant details.
– Kulfy
May 11 at 14:23