How to create a launcher to execute a terminal command?











up vote
4
down vote

favorite












for example, this terminal command: ping www.google.com so my question is how can I create a launcher in my desktop can do this command, so there is no longer needs to open terminal every time and write this it.










share|improve this question




























    up vote
    4
    down vote

    favorite












    for example, this terminal command: ping www.google.com so my question is how can I create a launcher in my desktop can do this command, so there is no longer needs to open terminal every time and write this it.










    share|improve this question


























      up vote
      4
      down vote

      favorite









      up vote
      4
      down vote

      favorite











      for example, this terminal command: ping www.google.com so my question is how can I create a launcher in my desktop can do this command, so there is no longer needs to open terminal every time and write this it.










      share|improve this question















      for example, this terminal command: ping www.google.com so my question is how can I create a launcher in my desktop can do this command, so there is no longer needs to open terminal every time and write this it.







      command-line launcher






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Jun 1 '14 at 2:48

























      asked Jun 1 '14 at 2:22









      Mohammad

      3151616




      3151616






















          3 Answers
          3






          active

          oldest

          votes

















          up vote
          8
          down vote



          accepted










          Well you could create a new document on your Desktop, name it something.desktop like ping1.desktop



          Then put this in, Name= & Icon= lines can be whatever you want (usually best to full path Icon=) or you can leave Icon= blank



          [Desktop Entry]
          Version=1.0
          Type=Application
          Terminal=true
          Exec=ping www.google.com
          Name=whatever you want
          Icon=


          After creating right click on the launcher > Properties > Permissions > & check the Execute: box



          (- you could also extend it's use to other pings if you use in unity's launcher via added quicklist entries in the .desktop






          share|improve this answer





















          • it worked, thank you my friend :)
            – Mohammad
            Jun 1 '14 at 3:14


















          up vote
          2
          down vote













          It took me a while to understand this because I'm a total Ubuntu beginner. Eventually, I figured it out. Rewritten in terms a dummy and a beginner like me might more easily understand:



          1) Right click on desktop. From the pop-up menu select "New Document", then "Empty Document".



          2) Name the document something.desktop, where "something" is replaced by the name you want.



          3) Open the document with gedit (usually just by double clicking).



          4) In gedit paste the following in, where "whatever you want" is the name of the launcher you choose, and where "path to icon", is the path to the icon you want, i.e. the directory location of the icon image:



          [Desktop Entry]
          Version=1.0
          Type=Application
          Terminal=true
          Exec=ping www.google.com
          Name= whatever you want
          Icon= path to icon


          5) After creating right click on the launcher > Properties > Permissions > & check the Execute: box






          share|improve this answer






























            up vote
            0
            down vote













            For example, to find the path to execute Spyder, type : "which spyder" in the terminal and the response was for me : /home/tech/anaconda3/bin/spyder



            Then I wrote this in spyder.desktop :



            [Desktop Entry]
            Version=1.0
            Type=Application
            Terminal=false
            Exec=/home/tech/anaconda3/bin/spyder
            Name=spyder
            Icon=/usr/share/spyder/images/spyder.png





            share|improve this answer























            • pls be more elaborate about what to do with the *.desktop file, where to save etc
              – db429
              Nov 30 at 20:30











            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',
            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%2f475081%2fhow-to-create-a-launcher-to-execute-a-terminal-command%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








            up vote
            8
            down vote



            accepted










            Well you could create a new document on your Desktop, name it something.desktop like ping1.desktop



            Then put this in, Name= & Icon= lines can be whatever you want (usually best to full path Icon=) or you can leave Icon= blank



            [Desktop Entry]
            Version=1.0
            Type=Application
            Terminal=true
            Exec=ping www.google.com
            Name=whatever you want
            Icon=


            After creating right click on the launcher > Properties > Permissions > & check the Execute: box



            (- you could also extend it's use to other pings if you use in unity's launcher via added quicklist entries in the .desktop






            share|improve this answer





















            • it worked, thank you my friend :)
              – Mohammad
              Jun 1 '14 at 3:14















            up vote
            8
            down vote



            accepted










            Well you could create a new document on your Desktop, name it something.desktop like ping1.desktop



            Then put this in, Name= & Icon= lines can be whatever you want (usually best to full path Icon=) or you can leave Icon= blank



            [Desktop Entry]
            Version=1.0
            Type=Application
            Terminal=true
            Exec=ping www.google.com
            Name=whatever you want
            Icon=


            After creating right click on the launcher > Properties > Permissions > & check the Execute: box



            (- you could also extend it's use to other pings if you use in unity's launcher via added quicklist entries in the .desktop






            share|improve this answer





















            • it worked, thank you my friend :)
              – Mohammad
              Jun 1 '14 at 3:14













            up vote
            8
            down vote



            accepted







            up vote
            8
            down vote



            accepted






            Well you could create a new document on your Desktop, name it something.desktop like ping1.desktop



            Then put this in, Name= & Icon= lines can be whatever you want (usually best to full path Icon=) or you can leave Icon= blank



            [Desktop Entry]
            Version=1.0
            Type=Application
            Terminal=true
            Exec=ping www.google.com
            Name=whatever you want
            Icon=


            After creating right click on the launcher > Properties > Permissions > & check the Execute: box



            (- you could also extend it's use to other pings if you use in unity's launcher via added quicklist entries in the .desktop






            share|improve this answer












            Well you could create a new document on your Desktop, name it something.desktop like ping1.desktop



            Then put this in, Name= & Icon= lines can be whatever you want (usually best to full path Icon=) or you can leave Icon= blank



            [Desktop Entry]
            Version=1.0
            Type=Application
            Terminal=true
            Exec=ping www.google.com
            Name=whatever you want
            Icon=


            After creating right click on the launcher > Properties > Permissions > & check the Execute: box



            (- you could also extend it's use to other pings if you use in unity's launcher via added quicklist entries in the .desktop







            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered Jun 1 '14 at 3:06









            doug

            14k13552




            14k13552












            • it worked, thank you my friend :)
              – Mohammad
              Jun 1 '14 at 3:14


















            • it worked, thank you my friend :)
              – Mohammad
              Jun 1 '14 at 3:14
















            it worked, thank you my friend :)
            – Mohammad
            Jun 1 '14 at 3:14




            it worked, thank you my friend :)
            – Mohammad
            Jun 1 '14 at 3:14












            up vote
            2
            down vote













            It took me a while to understand this because I'm a total Ubuntu beginner. Eventually, I figured it out. Rewritten in terms a dummy and a beginner like me might more easily understand:



            1) Right click on desktop. From the pop-up menu select "New Document", then "Empty Document".



            2) Name the document something.desktop, where "something" is replaced by the name you want.



            3) Open the document with gedit (usually just by double clicking).



            4) In gedit paste the following in, where "whatever you want" is the name of the launcher you choose, and where "path to icon", is the path to the icon you want, i.e. the directory location of the icon image:



            [Desktop Entry]
            Version=1.0
            Type=Application
            Terminal=true
            Exec=ping www.google.com
            Name= whatever you want
            Icon= path to icon


            5) After creating right click on the launcher > Properties > Permissions > & check the Execute: box






            share|improve this answer



























              up vote
              2
              down vote













              It took me a while to understand this because I'm a total Ubuntu beginner. Eventually, I figured it out. Rewritten in terms a dummy and a beginner like me might more easily understand:



              1) Right click on desktop. From the pop-up menu select "New Document", then "Empty Document".



              2) Name the document something.desktop, where "something" is replaced by the name you want.



              3) Open the document with gedit (usually just by double clicking).



              4) In gedit paste the following in, where "whatever you want" is the name of the launcher you choose, and where "path to icon", is the path to the icon you want, i.e. the directory location of the icon image:



              [Desktop Entry]
              Version=1.0
              Type=Application
              Terminal=true
              Exec=ping www.google.com
              Name= whatever you want
              Icon= path to icon


              5) After creating right click on the launcher > Properties > Permissions > & check the Execute: box






              share|improve this answer

























                up vote
                2
                down vote










                up vote
                2
                down vote









                It took me a while to understand this because I'm a total Ubuntu beginner. Eventually, I figured it out. Rewritten in terms a dummy and a beginner like me might more easily understand:



                1) Right click on desktop. From the pop-up menu select "New Document", then "Empty Document".



                2) Name the document something.desktop, where "something" is replaced by the name you want.



                3) Open the document with gedit (usually just by double clicking).



                4) In gedit paste the following in, where "whatever you want" is the name of the launcher you choose, and where "path to icon", is the path to the icon you want, i.e. the directory location of the icon image:



                [Desktop Entry]
                Version=1.0
                Type=Application
                Terminal=true
                Exec=ping www.google.com
                Name= whatever you want
                Icon= path to icon


                5) After creating right click on the launcher > Properties > Permissions > & check the Execute: box






                share|improve this answer














                It took me a while to understand this because I'm a total Ubuntu beginner. Eventually, I figured it out. Rewritten in terms a dummy and a beginner like me might more easily understand:



                1) Right click on desktop. From the pop-up menu select "New Document", then "Empty Document".



                2) Name the document something.desktop, where "something" is replaced by the name you want.



                3) Open the document with gedit (usually just by double clicking).



                4) In gedit paste the following in, where "whatever you want" is the name of the launcher you choose, and where "path to icon", is the path to the icon you want, i.e. the directory location of the icon image:



                [Desktop Entry]
                Version=1.0
                Type=Application
                Terminal=true
                Exec=ping www.google.com
                Name= whatever you want
                Icon= path to icon


                5) After creating right click on the launcher > Properties > Permissions > & check the Execute: box







                share|improve this answer














                share|improve this answer



                share|improve this answer








                edited Feb 27 at 0:08









                user68186

                15k84563




                15k84563










                answered Feb 27 at 0:04









                Rob

                211




                211






















                    up vote
                    0
                    down vote













                    For example, to find the path to execute Spyder, type : "which spyder" in the terminal and the response was for me : /home/tech/anaconda3/bin/spyder



                    Then I wrote this in spyder.desktop :



                    [Desktop Entry]
                    Version=1.0
                    Type=Application
                    Terminal=false
                    Exec=/home/tech/anaconda3/bin/spyder
                    Name=spyder
                    Icon=/usr/share/spyder/images/spyder.png





                    share|improve this answer























                    • pls be more elaborate about what to do with the *.desktop file, where to save etc
                      – db429
                      Nov 30 at 20:30















                    up vote
                    0
                    down vote













                    For example, to find the path to execute Spyder, type : "which spyder" in the terminal and the response was for me : /home/tech/anaconda3/bin/spyder



                    Then I wrote this in spyder.desktop :



                    [Desktop Entry]
                    Version=1.0
                    Type=Application
                    Terminal=false
                    Exec=/home/tech/anaconda3/bin/spyder
                    Name=spyder
                    Icon=/usr/share/spyder/images/spyder.png





                    share|improve this answer























                    • pls be more elaborate about what to do with the *.desktop file, where to save etc
                      – db429
                      Nov 30 at 20:30













                    up vote
                    0
                    down vote










                    up vote
                    0
                    down vote









                    For example, to find the path to execute Spyder, type : "which spyder" in the terminal and the response was for me : /home/tech/anaconda3/bin/spyder



                    Then I wrote this in spyder.desktop :



                    [Desktop Entry]
                    Version=1.0
                    Type=Application
                    Terminal=false
                    Exec=/home/tech/anaconda3/bin/spyder
                    Name=spyder
                    Icon=/usr/share/spyder/images/spyder.png





                    share|improve this answer














                    For example, to find the path to execute Spyder, type : "which spyder" in the terminal and the response was for me : /home/tech/anaconda3/bin/spyder



                    Then I wrote this in spyder.desktop :



                    [Desktop Entry]
                    Version=1.0
                    Type=Application
                    Terminal=false
                    Exec=/home/tech/anaconda3/bin/spyder
                    Name=spyder
                    Icon=/usr/share/spyder/images/spyder.png






                    share|improve this answer














                    share|improve this answer



                    share|improve this answer








                    edited Nov 30 at 18:46

























                    answered Nov 30 at 18:38









                    OneProgressist

                    11




                    11












                    • pls be more elaborate about what to do with the *.desktop file, where to save etc
                      – db429
                      Nov 30 at 20:30


















                    • pls be more elaborate about what to do with the *.desktop file, where to save etc
                      – db429
                      Nov 30 at 20:30
















                    pls be more elaborate about what to do with the *.desktop file, where to save etc
                    – db429
                    Nov 30 at 20:30




                    pls be more elaborate about what to do with the *.desktop file, where to save etc
                    – db429
                    Nov 30 at 20:30


















                    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.





                    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.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f475081%2fhow-to-create-a-launcher-to-execute-a-terminal-command%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

                    Mouse cursor on multiple screens with different PPI

                    Agildo Ribeiro

                    Sometime when accessing a menu: “Ubuntu 16.04 has experienced an internal error”