Add menu option to favoured app launcher in Ubuntu dock

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP








up vote
4
down vote

favorite
1












I can't find the way to add a custom menu entry to a .desktop launcher.



In Unity I was able to add custom menu entryes to launcher like "Open customfile.txt" or "Open somespreadsheet.ods". Is that possible in Ubuntu Dock?







share|improve this question
























    up vote
    4
    down vote

    favorite
    1












    I can't find the way to add a custom menu entry to a .desktop launcher.



    In Unity I was able to add custom menu entryes to launcher like "Open customfile.txt" or "Open somespreadsheet.ods". Is that possible in Ubuntu Dock?







    share|improve this question






















      up vote
      4
      down vote

      favorite
      1









      up vote
      4
      down vote

      favorite
      1






      1





      I can't find the way to add a custom menu entry to a .desktop launcher.



      In Unity I was able to add custom menu entryes to launcher like "Open customfile.txt" or "Open somespreadsheet.ods". Is that possible in Ubuntu Dock?







      share|improve this question












      I can't find the way to add a custom menu entry to a .desktop launcher.



      In Unity I was able to add custom menu entryes to launcher like "Open customfile.txt" or "Open somespreadsheet.ods". Is that possible in Ubuntu Dock?









      share|improve this question











      share|improve this question




      share|improve this question










      asked May 4 at 0:34









      razor7

      591722




      591722




















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          4
          down vote



          accepted










          Follow the steps below.




          1. Copy .desktop file associated to your preferred application, say app-name.desktop from /usr/share/applications/ to ~/.local/share/applications/. You can do this by running the following command in Terminal



            cp /usr/share/applications/app-name.desktop ~/.local/share/applications/



          2. Open the .desktop file using a text-editor, for example by running



            gedit ~/.local/share/applications/app-name.desktop



          3. Look for a line beginning with Actions=. If there is one, append My-Custom-Action; to it. Otherwise add the following line



            Actions=My-Custom-Action;



          4. Write the following lines at end of the file:



            [Desktop Action My-Custom-Action]
            Name=Name of the Option
            Exec=command-you-want-ro-run


            For example if you want to open Text editor, put gedit in place of command-you-want-ro-run.



          5. Save the file.


          6. Click on "Activities" and search for the application.


          7. Right click on the application icon and select "Add to Favourites". It should be added to the Ubuntu dock.


          Now if you right click on the newly added application icon in the dock, you should see a "Name of the Option" entry in the context menu which should work as expected.



          Similarly you can other options by adding new Desktop Actions and adding the name of the action to the Actions= line. For more info see this.






          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',
            convertImagesToLinks: true,
            noModals: false,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            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%2f1031780%2fadd-menu-option-to-favoured-app-launcher-in-ubuntu-dock%23new-answer', 'question_page');

            );

            Post as a guest






























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes








            up vote
            4
            down vote



            accepted










            Follow the steps below.




            1. Copy .desktop file associated to your preferred application, say app-name.desktop from /usr/share/applications/ to ~/.local/share/applications/. You can do this by running the following command in Terminal



              cp /usr/share/applications/app-name.desktop ~/.local/share/applications/



            2. Open the .desktop file using a text-editor, for example by running



              gedit ~/.local/share/applications/app-name.desktop



            3. Look for a line beginning with Actions=. If there is one, append My-Custom-Action; to it. Otherwise add the following line



              Actions=My-Custom-Action;



            4. Write the following lines at end of the file:



              [Desktop Action My-Custom-Action]
              Name=Name of the Option
              Exec=command-you-want-ro-run


              For example if you want to open Text editor, put gedit in place of command-you-want-ro-run.



            5. Save the file.


            6. Click on "Activities" and search for the application.


            7. Right click on the application icon and select "Add to Favourites". It should be added to the Ubuntu dock.


            Now if you right click on the newly added application icon in the dock, you should see a "Name of the Option" entry in the context menu which should work as expected.



            Similarly you can other options by adding new Desktop Actions and adding the name of the action to the Actions= line. For more info see this.






            share|improve this answer
























              up vote
              4
              down vote



              accepted










              Follow the steps below.




              1. Copy .desktop file associated to your preferred application, say app-name.desktop from /usr/share/applications/ to ~/.local/share/applications/. You can do this by running the following command in Terminal



                cp /usr/share/applications/app-name.desktop ~/.local/share/applications/



              2. Open the .desktop file using a text-editor, for example by running



                gedit ~/.local/share/applications/app-name.desktop



              3. Look for a line beginning with Actions=. If there is one, append My-Custom-Action; to it. Otherwise add the following line



                Actions=My-Custom-Action;



              4. Write the following lines at end of the file:



                [Desktop Action My-Custom-Action]
                Name=Name of the Option
                Exec=command-you-want-ro-run


                For example if you want to open Text editor, put gedit in place of command-you-want-ro-run.



              5. Save the file.


              6. Click on "Activities" and search for the application.


              7. Right click on the application icon and select "Add to Favourites". It should be added to the Ubuntu dock.


              Now if you right click on the newly added application icon in the dock, you should see a "Name of the Option" entry in the context menu which should work as expected.



              Similarly you can other options by adding new Desktop Actions and adding the name of the action to the Actions= line. For more info see this.






              share|improve this answer






















                up vote
                4
                down vote



                accepted







                up vote
                4
                down vote



                accepted






                Follow the steps below.




                1. Copy .desktop file associated to your preferred application, say app-name.desktop from /usr/share/applications/ to ~/.local/share/applications/. You can do this by running the following command in Terminal



                  cp /usr/share/applications/app-name.desktop ~/.local/share/applications/



                2. Open the .desktop file using a text-editor, for example by running



                  gedit ~/.local/share/applications/app-name.desktop



                3. Look for a line beginning with Actions=. If there is one, append My-Custom-Action; to it. Otherwise add the following line



                  Actions=My-Custom-Action;



                4. Write the following lines at end of the file:



                  [Desktop Action My-Custom-Action]
                  Name=Name of the Option
                  Exec=command-you-want-ro-run


                  For example if you want to open Text editor, put gedit in place of command-you-want-ro-run.



                5. Save the file.


                6. Click on "Activities" and search for the application.


                7. Right click on the application icon and select "Add to Favourites". It should be added to the Ubuntu dock.


                Now if you right click on the newly added application icon in the dock, you should see a "Name of the Option" entry in the context menu which should work as expected.



                Similarly you can other options by adding new Desktop Actions and adding the name of the action to the Actions= line. For more info see this.






                share|improve this answer












                Follow the steps below.




                1. Copy .desktop file associated to your preferred application, say app-name.desktop from /usr/share/applications/ to ~/.local/share/applications/. You can do this by running the following command in Terminal



                  cp /usr/share/applications/app-name.desktop ~/.local/share/applications/



                2. Open the .desktop file using a text-editor, for example by running



                  gedit ~/.local/share/applications/app-name.desktop



                3. Look for a line beginning with Actions=. If there is one, append My-Custom-Action; to it. Otherwise add the following line



                  Actions=My-Custom-Action;



                4. Write the following lines at end of the file:



                  [Desktop Action My-Custom-Action]
                  Name=Name of the Option
                  Exec=command-you-want-ro-run


                  For example if you want to open Text editor, put gedit in place of command-you-want-ro-run.



                5. Save the file.


                6. Click on "Activities" and search for the application.


                7. Right click on the application icon and select "Add to Favourites". It should be added to the Ubuntu dock.


                Now if you right click on the newly added application icon in the dock, you should see a "Name of the Option" entry in the context menu which should work as expected.



                Similarly you can other options by adding new Desktop Actions and adding the name of the action to the Actions= line. For more info see this.







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered May 4 at 1:09









                pomsky

                22.1k76996




                22.1k76996






















                     

                    draft saved


                    draft discarded


























                     


                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1031780%2fadd-menu-option-to-favoured-app-launcher-in-ubuntu-dock%23new-answer', 'question_page');

                    );

                    Post as a guest













































































                    Popular posts from this blog

                    pylint3 and pip3 broken

                    Missing snmpget and snmpwalk

                    How to enroll fingerprints to Ubuntu 17.10 with VFS491