Starting a script in a Desktop icon





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}







3















I have the following .desktop file on my Desktop:



[Desktop Entry]
Encoding=UTF-8
Name=Robomongo
Comment=Launch Robomongo
Exec=/usr/local/robomongo-0.8.4-i386/bin/robomongo.sh
Icon=/usr/local/robomongo-0.8.4-i386/share/icons/robomongo.png
Type=Application
Terminal=true


I want the application to start up with a terminal window. When I click it it opens a terminal window but doesn't acatually run the script. How can I set that up? If I make "Terminal=false", then it starts the program with no terminal window. I also tried creating a link, but don't get a terminal window.



I'm also having a problem with this icon. It keeps giving me a "Invalid desktop entry file: '/home/dev/Desktop/mongod-port-27007.desktop" error. mongod works from the shell.



[Desktop Entry]
Encoding=UTF-8
Name=mongod-port-27007
Comment=Launch Robomongo
Exec=mongod
Icon=/usr/local/robomongo-0.8.4-i386/share/icons/robomongo.png
Type=Application
Terminal=false









share|improve this question














bumped to the homepage by Community yesterday


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.






















    3















    I have the following .desktop file on my Desktop:



    [Desktop Entry]
    Encoding=UTF-8
    Name=Robomongo
    Comment=Launch Robomongo
    Exec=/usr/local/robomongo-0.8.4-i386/bin/robomongo.sh
    Icon=/usr/local/robomongo-0.8.4-i386/share/icons/robomongo.png
    Type=Application
    Terminal=true


    I want the application to start up with a terminal window. When I click it it opens a terminal window but doesn't acatually run the script. How can I set that up? If I make "Terminal=false", then it starts the program with no terminal window. I also tried creating a link, but don't get a terminal window.



    I'm also having a problem with this icon. It keeps giving me a "Invalid desktop entry file: '/home/dev/Desktop/mongod-port-27007.desktop" error. mongod works from the shell.



    [Desktop Entry]
    Encoding=UTF-8
    Name=mongod-port-27007
    Comment=Launch Robomongo
    Exec=mongod
    Icon=/usr/local/robomongo-0.8.4-i386/share/icons/robomongo.png
    Type=Application
    Terminal=false









    share|improve this question














    bumped to the homepage by Community yesterday


    This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.


















      3












      3








      3


      1






      I have the following .desktop file on my Desktop:



      [Desktop Entry]
      Encoding=UTF-8
      Name=Robomongo
      Comment=Launch Robomongo
      Exec=/usr/local/robomongo-0.8.4-i386/bin/robomongo.sh
      Icon=/usr/local/robomongo-0.8.4-i386/share/icons/robomongo.png
      Type=Application
      Terminal=true


      I want the application to start up with a terminal window. When I click it it opens a terminal window but doesn't acatually run the script. How can I set that up? If I make "Terminal=false", then it starts the program with no terminal window. I also tried creating a link, but don't get a terminal window.



      I'm also having a problem with this icon. It keeps giving me a "Invalid desktop entry file: '/home/dev/Desktop/mongod-port-27007.desktop" error. mongod works from the shell.



      [Desktop Entry]
      Encoding=UTF-8
      Name=mongod-port-27007
      Comment=Launch Robomongo
      Exec=mongod
      Icon=/usr/local/robomongo-0.8.4-i386/share/icons/robomongo.png
      Type=Application
      Terminal=false









      share|improve this question














      I have the following .desktop file on my Desktop:



      [Desktop Entry]
      Encoding=UTF-8
      Name=Robomongo
      Comment=Launch Robomongo
      Exec=/usr/local/robomongo-0.8.4-i386/bin/robomongo.sh
      Icon=/usr/local/robomongo-0.8.4-i386/share/icons/robomongo.png
      Type=Application
      Terminal=true


      I want the application to start up with a terminal window. When I click it it opens a terminal window but doesn't acatually run the script. How can I set that up? If I make "Terminal=false", then it starts the program with no terminal window. I also tried creating a link, but don't get a terminal window.



      I'm also having a problem with this icon. It keeps giving me a "Invalid desktop entry file: '/home/dev/Desktop/mongod-port-27007.desktop" error. mongod works from the shell.



      [Desktop Entry]
      Encoding=UTF-8
      Name=mongod-port-27007
      Comment=Launch Robomongo
      Exec=mongod
      Icon=/usr/local/robomongo-0.8.4-i386/share/icons/robomongo.png
      Type=Application
      Terminal=false






      lubuntu scripts icons xfce






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Oct 14 '14 at 15:20









      user994165user994165

      155110




      155110





      bumped to the homepage by Community yesterday


      This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.







      bumped to the homepage by Community yesterday


      This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
























          2 Answers
          2






          active

          oldest

          votes


















          1














          I tried the same desktop file definition and it works as expected for me. So double check that the launcher script has the right permissions:



          chmod u+x /usr/local/robomongo-0.8.4-i386/bin/robomongo.sh


          Alternatively you may try the following Exec command:



          Exec=bash /usr/local/robomongo-0.8.4-i386/bin/robomongo.sh





          share|improve this answer
























          • Adding +x made the script work. But it doesn't work for compiled commands like "mongod". Also, for the first one, when I switch to Terminal=true, I get a terminal come up, but the command doesn't execute.

            – user994165
            Oct 15 '14 at 15:34



















          1














          you can try this way:



          [Desktop Entry]
          Version=1.0
          Type=Application
          Hidden=false
          NoDisplay=false
          Terminal=false
          Encoding=UTF-8
          Exec=xfce4-terminal -x /usr/local/robomongo-0.8.4-i386/bin/robomongo.sh
          Icon=/usr/local/robomongo-0.8.4-i386/share/icons/robomongo.png
          Name=Robomongo
          Comment=Launch Robomongo


          and give the read permission with sudo chmod +x /usr/local/robomongo-0.8.4-i386/share/icons/robomongo.png && /usr/local/robomongo-0.8.4-i386/bin/robomongo.sh.



          The diference is that I execute the terminal with option -x:




          "−x, −−execute; −e, −−command=comanda; −−working−directory=directori;"




          And I added



          Hidden=false
          NoDisplay=false
          Terminal=false


          I have a script in gnome desktop and lxde desktop running with those so I hope it work for you too, but in gnome I use:



          Exec=gnome-terminal -x sudo /usr/local/bin/donacion.sh


          And for lxde or lubuntu:



          Exec=lxterminal -e sudo /usr/local/bin/donacion.sh


          Tell me if it worked, thx.






          share|improve this answer
























            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%2f536994%2fstarting-a-script-in-a-desktop-icon%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









            1














            I tried the same desktop file definition and it works as expected for me. So double check that the launcher script has the right permissions:



            chmod u+x /usr/local/robomongo-0.8.4-i386/bin/robomongo.sh


            Alternatively you may try the following Exec command:



            Exec=bash /usr/local/robomongo-0.8.4-i386/bin/robomongo.sh





            share|improve this answer
























            • Adding +x made the script work. But it doesn't work for compiled commands like "mongod". Also, for the first one, when I switch to Terminal=true, I get a terminal come up, but the command doesn't execute.

              – user994165
              Oct 15 '14 at 15:34
















            1














            I tried the same desktop file definition and it works as expected for me. So double check that the launcher script has the right permissions:



            chmod u+x /usr/local/robomongo-0.8.4-i386/bin/robomongo.sh


            Alternatively you may try the following Exec command:



            Exec=bash /usr/local/robomongo-0.8.4-i386/bin/robomongo.sh





            share|improve this answer
























            • Adding +x made the script work. But it doesn't work for compiled commands like "mongod". Also, for the first one, when I switch to Terminal=true, I get a terminal come up, but the command doesn't execute.

              – user994165
              Oct 15 '14 at 15:34














            1












            1








            1







            I tried the same desktop file definition and it works as expected for me. So double check that the launcher script has the right permissions:



            chmod u+x /usr/local/robomongo-0.8.4-i386/bin/robomongo.sh


            Alternatively you may try the following Exec command:



            Exec=bash /usr/local/robomongo-0.8.4-i386/bin/robomongo.sh





            share|improve this answer













            I tried the same desktop file definition and it works as expected for me. So double check that the launcher script has the right permissions:



            chmod u+x /usr/local/robomongo-0.8.4-i386/bin/robomongo.sh


            Alternatively you may try the following Exec command:



            Exec=bash /usr/local/robomongo-0.8.4-i386/bin/robomongo.sh






            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered Oct 14 '14 at 15:51









            Sylvain PineauSylvain Pineau

            49.6k16108152




            49.6k16108152













            • Adding +x made the script work. But it doesn't work for compiled commands like "mongod". Also, for the first one, when I switch to Terminal=true, I get a terminal come up, but the command doesn't execute.

              – user994165
              Oct 15 '14 at 15:34



















            • Adding +x made the script work. But it doesn't work for compiled commands like "mongod". Also, for the first one, when I switch to Terminal=true, I get a terminal come up, but the command doesn't execute.

              – user994165
              Oct 15 '14 at 15:34

















            Adding +x made the script work. But it doesn't work for compiled commands like "mongod". Also, for the first one, when I switch to Terminal=true, I get a terminal come up, but the command doesn't execute.

            – user994165
            Oct 15 '14 at 15:34





            Adding +x made the script work. But it doesn't work for compiled commands like "mongod". Also, for the first one, when I switch to Terminal=true, I get a terminal come up, but the command doesn't execute.

            – user994165
            Oct 15 '14 at 15:34













            1














            you can try this way:



            [Desktop Entry]
            Version=1.0
            Type=Application
            Hidden=false
            NoDisplay=false
            Terminal=false
            Encoding=UTF-8
            Exec=xfce4-terminal -x /usr/local/robomongo-0.8.4-i386/bin/robomongo.sh
            Icon=/usr/local/robomongo-0.8.4-i386/share/icons/robomongo.png
            Name=Robomongo
            Comment=Launch Robomongo


            and give the read permission with sudo chmod +x /usr/local/robomongo-0.8.4-i386/share/icons/robomongo.png && /usr/local/robomongo-0.8.4-i386/bin/robomongo.sh.



            The diference is that I execute the terminal with option -x:




            "−x, −−execute; −e, −−command=comanda; −−working−directory=directori;"




            And I added



            Hidden=false
            NoDisplay=false
            Terminal=false


            I have a script in gnome desktop and lxde desktop running with those so I hope it work for you too, but in gnome I use:



            Exec=gnome-terminal -x sudo /usr/local/bin/donacion.sh


            And for lxde or lubuntu:



            Exec=lxterminal -e sudo /usr/local/bin/donacion.sh


            Tell me if it worked, thx.






            share|improve this answer




























              1














              you can try this way:



              [Desktop Entry]
              Version=1.0
              Type=Application
              Hidden=false
              NoDisplay=false
              Terminal=false
              Encoding=UTF-8
              Exec=xfce4-terminal -x /usr/local/robomongo-0.8.4-i386/bin/robomongo.sh
              Icon=/usr/local/robomongo-0.8.4-i386/share/icons/robomongo.png
              Name=Robomongo
              Comment=Launch Robomongo


              and give the read permission with sudo chmod +x /usr/local/robomongo-0.8.4-i386/share/icons/robomongo.png && /usr/local/robomongo-0.8.4-i386/bin/robomongo.sh.



              The diference is that I execute the terminal with option -x:




              "−x, −−execute; −e, −−command=comanda; −−working−directory=directori;"




              And I added



              Hidden=false
              NoDisplay=false
              Terminal=false


              I have a script in gnome desktop and lxde desktop running with those so I hope it work for you too, but in gnome I use:



              Exec=gnome-terminal -x sudo /usr/local/bin/donacion.sh


              And for lxde or lubuntu:



              Exec=lxterminal -e sudo /usr/local/bin/donacion.sh


              Tell me if it worked, thx.






              share|improve this answer


























                1












                1








                1







                you can try this way:



                [Desktop Entry]
                Version=1.0
                Type=Application
                Hidden=false
                NoDisplay=false
                Terminal=false
                Encoding=UTF-8
                Exec=xfce4-terminal -x /usr/local/robomongo-0.8.4-i386/bin/robomongo.sh
                Icon=/usr/local/robomongo-0.8.4-i386/share/icons/robomongo.png
                Name=Robomongo
                Comment=Launch Robomongo


                and give the read permission with sudo chmod +x /usr/local/robomongo-0.8.4-i386/share/icons/robomongo.png && /usr/local/robomongo-0.8.4-i386/bin/robomongo.sh.



                The diference is that I execute the terminal with option -x:




                "−x, −−execute; −e, −−command=comanda; −−working−directory=directori;"




                And I added



                Hidden=false
                NoDisplay=false
                Terminal=false


                I have a script in gnome desktop and lxde desktop running with those so I hope it work for you too, but in gnome I use:



                Exec=gnome-terminal -x sudo /usr/local/bin/donacion.sh


                And for lxde or lubuntu:



                Exec=lxterminal -e sudo /usr/local/bin/donacion.sh


                Tell me if it worked, thx.






                share|improve this answer













                you can try this way:



                [Desktop Entry]
                Version=1.0
                Type=Application
                Hidden=false
                NoDisplay=false
                Terminal=false
                Encoding=UTF-8
                Exec=xfce4-terminal -x /usr/local/robomongo-0.8.4-i386/bin/robomongo.sh
                Icon=/usr/local/robomongo-0.8.4-i386/share/icons/robomongo.png
                Name=Robomongo
                Comment=Launch Robomongo


                and give the read permission with sudo chmod +x /usr/local/robomongo-0.8.4-i386/share/icons/robomongo.png && /usr/local/robomongo-0.8.4-i386/bin/robomongo.sh.



                The diference is that I execute the terminal with option -x:




                "−x, −−execute; −e, −−command=comanda; −−working−directory=directori;"




                And I added



                Hidden=false
                NoDisplay=false
                Terminal=false


                I have a script in gnome desktop and lxde desktop running with those so I hope it work for you too, but in gnome I use:



                Exec=gnome-terminal -x sudo /usr/local/bin/donacion.sh


                And for lxde or lubuntu:



                Exec=lxterminal -e sudo /usr/local/bin/donacion.sh


                Tell me if it worked, thx.







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Jan 1 '15 at 9:46









                blkpwsblkpws

                693611




                693611






























                    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%2f536994%2fstarting-a-script-in-a-desktop-icon%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

                    香粉寮

                    GameSpot