Add menu option to favoured app launcher in Ubuntu dock












9















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





























    9















    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



























      9












      9








      9


      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?







      18.04 gnome-shell .desktop ubuntu-dock






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Jan 11 at 21:40









      pomsky

      30.1k1192125




      30.1k1192125










      asked May 4 '18 at 0:34









      razor7razor7

      701923




      701923






















          1 Answer
          1






          active

          oldest

          votes


















          8














          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',
            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%2f1031780%2fadd-menu-option-to-favoured-app-launcher-in-ubuntu-dock%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









            8














            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




























              8














              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


























                8












                8








                8







                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 '18 at 1:09









                pomskypomsky

                30.1k1192125




                30.1k1192125






























                    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%2f1031780%2fadd-menu-option-to-favoured-app-launcher-in-ubuntu-dock%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

                    flock() on closed filehandle LOCK_FILE at /usr/bin/apt-mirror

                    Mangá

                    Eduardo VII do Reino Unido