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;








4















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:



Before



I modified it to:



After










share|improve this question



















  • 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

















4















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:



Before



I modified it to:



After










share|improve this question



















  • 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













4












4








4








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:



Before



I modified it to:



After










share|improve this question
















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:



Before



I modified it to:



After







19.04 startup-applications






share|improve this question















share|improve this question













share|improve this question




share|improve this question








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












  • 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










1 Answer
1






active

oldest

votes


















5














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.






share|improve this answer




















  • 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











  • @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 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











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%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









5














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.






share|improve this answer




















  • 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











  • @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 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















5














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.






share|improve this answer




















  • 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











  • @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 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













5












5








5







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.






share|improve this answer















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.







share|improve this answer














share|improve this answer



share|improve this answer








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, 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











  • @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





    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











  • @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

















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.




draft saved


draft discarded














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





















































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

Get product attribute by attribute group code in magento 2get product attribute by product attribute group in magento 2Magento 2 Log Bundle Product Data in List Page?How to get all product attribute of a attribute group of Default attribute set?Magento 2.1 Create a filter in the product grid by new attributeMagento 2 : Get Product Attribute values By GroupMagento 2 How to get all existing values for one attributeMagento 2 get custom attribute of a single product inside a pluginMagento 2.3 How to get all the Multi Source Inventory (MSI) locations collection in custom module?Magento2: how to develop rest API to get new productsGet product attribute by attribute group code ( [attribute_group_code] ) in magento 2

Category:9 (number) SubcategoriesMedia in category "9 (number)"Navigation menuUpload mediaGND ID: 4485639-8Library of Congress authority ID: sh85091979ReasonatorScholiaStatistics

Magento 2.3: How do i solve this, Not registered handle, on custom form?How can i rewrite TierPrice Block in Magento2magento 2 captcha not rendering if I override layout xmlmain.CRITICAL: Plugin class doesn't existMagento 2 : Problem while adding custom button order view page?Magento 2.2.5: Overriding Admin Controller sales/orderMagento 2.2.5: Add, Update and Delete existing products Custom OptionsMagento 2.3 : File Upload issue in UI Component FormMagento2 Not registered handleHow to configured Form Builder Js in my custom magento 2.3.0 module?Magento 2.3. How to create image upload field in an admin form