How can I find *.desktop files?












75















To the best of my knowledge, all shortcuts in the Unity Launcher have a corresponding *.desktop file. I have one shortcut (for skrooge) that doesn't have an icon. How can I find the *.desktop file corresponding to this shortcut so that I can add an icon to it?










share|improve this question





























    75















    To the best of my knowledge, all shortcuts in the Unity Launcher have a corresponding *.desktop file. I have one shortcut (for skrooge) that doesn't have an icon. How can I find the *.desktop file corresponding to this shortcut so that I can add an icon to it?










    share|improve this question



























      75












      75








      75


      23






      To the best of my knowledge, all shortcuts in the Unity Launcher have a corresponding *.desktop file. I have one shortcut (for skrooge) that doesn't have an icon. How can I find the *.desktop file corresponding to this shortcut so that I can add an icon to it?










      share|improve this question
















      To the best of my knowledge, all shortcuts in the Unity Launcher have a corresponding *.desktop file. I have one shortcut (for skrooge) that doesn't have an icon. How can I find the *.desktop file corresponding to this shortcut so that I can add an icon to it?







      unity launcher .desktop






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Oct 4 '15 at 7:43









      Slothworks

      342117




      342117










      asked Mar 30 '12 at 13:52









      KovikoKoviko

      6482917




      6482917






















          3 Answers
          3






          active

          oldest

          votes


















          97














          It's probably sitting in /usr/share/applications/ but if you want to find every .desktop file on the system run this:



          find / -name '*.desktop'


          or



          sudo updatedb
          locate *.desktop


          To find files with "skrooge" in their path or name, add a grep to the command:



          locate *.desktop | grep -iR "skrooge"





          share|improve this answer





















          • 19





            locate -i "*skrooge*.desktop". Though there's mainly three places unity will look for desktop files. ~/.local/share/applications, /usr/local/share/applications and /usr/share/applications. If there are desktop files for the same command in multiple places, it'll use the left-most of the three I listed.

            – geirha
            Mar 30 '12 at 14:32











          • Showed up as /usr/share/applications/kde4/skrooge.desktop. Thanks. :)

            – Koviko
            Mar 30 '12 at 15:08



















          32














          The system stores the .desktop files in /usr/share/applications/. Unfortunately, if you open that folder in nautilus the .desktop files appears with the icon specified in the file and with the file name called out within the file. You also won't be allowed to edit these files by clicking on them and selecting edit.



          To edit these files, you need to open that folder within a terminal window. Doing an ls command will show all the .desktop files with their actual names. When you locate the .desktop you wish to change, run gksudo gedit {file-name}.desktop.



          It's normal practice to keep any .desktop files you create or edit in your home folder ~/.local/share/applications.






          share|improve this answer


























          • Running from the terminal can be handier for some, but it is also possible to drag from nautilus into gedit or another text editor.

            – Jon Hanna
            May 1 '14 at 21:40











          • what's the point of the directory "~/.local/share/applications"? Files there don't seem to be used, not I cannot add them as "shortcut" to Unity.

            – Malachiasz
            Feb 8 '15 at 15:14






          • 2





            @Malachiasz Actually, the *.desktop files from ~/.local/share/applications are reloaded when session restarts. So, log out and log back in. Note that these are specific to that user.

            – akshay2000
            Mar 21 '15 at 7:11











          • I also found this Q&A here on site useful: How to force Unity reload ~/.local/share/applications/

            – hakre
            Sep 18 '17 at 18:19





















          4














          Some additional details to supplement the other answers:



          Typically, .desktop files for packages will be located in /usr/share/applications.



          If you want, you could copy one to ~/.local/share/applications and edit it there without needing sudo. Items in ~/.local/share/applications will override matching items in /usr/share/applications and /usr/local/share/applications, but are only visible to your user.



          Alternatively, you could place an edited copy in /usr/local/share/applications where it will override any in /usr/share/applications while also being visible to the entire system.



          Note that you should not edit the .desktop files in /usr/share/applications directly; any changes you make will be automatically overwritten when the application is updated by the package manager.



          Extracted from here






          share|improve this answer


























          • +1, most complete answer out of all of them

            – Jon Bentley
            Feb 19 at 0:22











          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%2f117341%2fhow-can-i-find-desktop-files%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









          97














          It's probably sitting in /usr/share/applications/ but if you want to find every .desktop file on the system run this:



          find / -name '*.desktop'


          or



          sudo updatedb
          locate *.desktop


          To find files with "skrooge" in their path or name, add a grep to the command:



          locate *.desktop | grep -iR "skrooge"





          share|improve this answer





















          • 19





            locate -i "*skrooge*.desktop". Though there's mainly three places unity will look for desktop files. ~/.local/share/applications, /usr/local/share/applications and /usr/share/applications. If there are desktop files for the same command in multiple places, it'll use the left-most of the three I listed.

            – geirha
            Mar 30 '12 at 14:32











          • Showed up as /usr/share/applications/kde4/skrooge.desktop. Thanks. :)

            – Koviko
            Mar 30 '12 at 15:08
















          97














          It's probably sitting in /usr/share/applications/ but if you want to find every .desktop file on the system run this:



          find / -name '*.desktop'


          or



          sudo updatedb
          locate *.desktop


          To find files with "skrooge" in their path or name, add a grep to the command:



          locate *.desktop | grep -iR "skrooge"





          share|improve this answer





















          • 19





            locate -i "*skrooge*.desktop". Though there's mainly three places unity will look for desktop files. ~/.local/share/applications, /usr/local/share/applications and /usr/share/applications. If there are desktop files for the same command in multiple places, it'll use the left-most of the three I listed.

            – geirha
            Mar 30 '12 at 14:32











          • Showed up as /usr/share/applications/kde4/skrooge.desktop. Thanks. :)

            – Koviko
            Mar 30 '12 at 15:08














          97












          97








          97







          It's probably sitting in /usr/share/applications/ but if you want to find every .desktop file on the system run this:



          find / -name '*.desktop'


          or



          sudo updatedb
          locate *.desktop


          To find files with "skrooge" in their path or name, add a grep to the command:



          locate *.desktop | grep -iR "skrooge"





          share|improve this answer















          It's probably sitting in /usr/share/applications/ but if you want to find every .desktop file on the system run this:



          find / -name '*.desktop'


          or



          sudo updatedb
          locate *.desktop


          To find files with "skrooge" in their path or name, add a grep to the command:



          locate *.desktop | grep -iR "skrooge"






          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Mar 22 '13 at 16:57









          8128

          24.9k21101137




          24.9k21101137










          answered Mar 30 '12 at 13:56









          OliOli

          223k89566766




          223k89566766








          • 19





            locate -i "*skrooge*.desktop". Though there's mainly three places unity will look for desktop files. ~/.local/share/applications, /usr/local/share/applications and /usr/share/applications. If there are desktop files for the same command in multiple places, it'll use the left-most of the three I listed.

            – geirha
            Mar 30 '12 at 14:32











          • Showed up as /usr/share/applications/kde4/skrooge.desktop. Thanks. :)

            – Koviko
            Mar 30 '12 at 15:08














          • 19





            locate -i "*skrooge*.desktop". Though there's mainly three places unity will look for desktop files. ~/.local/share/applications, /usr/local/share/applications and /usr/share/applications. If there are desktop files for the same command in multiple places, it'll use the left-most of the three I listed.

            – geirha
            Mar 30 '12 at 14:32











          • Showed up as /usr/share/applications/kde4/skrooge.desktop. Thanks. :)

            – Koviko
            Mar 30 '12 at 15:08








          19




          19





          locate -i "*skrooge*.desktop". Though there's mainly three places unity will look for desktop files. ~/.local/share/applications, /usr/local/share/applications and /usr/share/applications. If there are desktop files for the same command in multiple places, it'll use the left-most of the three I listed.

          – geirha
          Mar 30 '12 at 14:32





          locate -i "*skrooge*.desktop". Though there's mainly three places unity will look for desktop files. ~/.local/share/applications, /usr/local/share/applications and /usr/share/applications. If there are desktop files for the same command in multiple places, it'll use the left-most of the three I listed.

          – geirha
          Mar 30 '12 at 14:32













          Showed up as /usr/share/applications/kde4/skrooge.desktop. Thanks. :)

          – Koviko
          Mar 30 '12 at 15:08





          Showed up as /usr/share/applications/kde4/skrooge.desktop. Thanks. :)

          – Koviko
          Mar 30 '12 at 15:08













          32














          The system stores the .desktop files in /usr/share/applications/. Unfortunately, if you open that folder in nautilus the .desktop files appears with the icon specified in the file and with the file name called out within the file. You also won't be allowed to edit these files by clicking on them and selecting edit.



          To edit these files, you need to open that folder within a terminal window. Doing an ls command will show all the .desktop files with their actual names. When you locate the .desktop you wish to change, run gksudo gedit {file-name}.desktop.



          It's normal practice to keep any .desktop files you create or edit in your home folder ~/.local/share/applications.






          share|improve this answer


























          • Running from the terminal can be handier for some, but it is also possible to drag from nautilus into gedit or another text editor.

            – Jon Hanna
            May 1 '14 at 21:40











          • what's the point of the directory "~/.local/share/applications"? Files there don't seem to be used, not I cannot add them as "shortcut" to Unity.

            – Malachiasz
            Feb 8 '15 at 15:14






          • 2





            @Malachiasz Actually, the *.desktop files from ~/.local/share/applications are reloaded when session restarts. So, log out and log back in. Note that these are specific to that user.

            – akshay2000
            Mar 21 '15 at 7:11











          • I also found this Q&A here on site useful: How to force Unity reload ~/.local/share/applications/

            – hakre
            Sep 18 '17 at 18:19


















          32














          The system stores the .desktop files in /usr/share/applications/. Unfortunately, if you open that folder in nautilus the .desktop files appears with the icon specified in the file and with the file name called out within the file. You also won't be allowed to edit these files by clicking on them and selecting edit.



          To edit these files, you need to open that folder within a terminal window. Doing an ls command will show all the .desktop files with their actual names. When you locate the .desktop you wish to change, run gksudo gedit {file-name}.desktop.



          It's normal practice to keep any .desktop files you create or edit in your home folder ~/.local/share/applications.






          share|improve this answer


























          • Running from the terminal can be handier for some, but it is also possible to drag from nautilus into gedit or another text editor.

            – Jon Hanna
            May 1 '14 at 21:40











          • what's the point of the directory "~/.local/share/applications"? Files there don't seem to be used, not I cannot add them as "shortcut" to Unity.

            – Malachiasz
            Feb 8 '15 at 15:14






          • 2





            @Malachiasz Actually, the *.desktop files from ~/.local/share/applications are reloaded when session restarts. So, log out and log back in. Note that these are specific to that user.

            – akshay2000
            Mar 21 '15 at 7:11











          • I also found this Q&A here on site useful: How to force Unity reload ~/.local/share/applications/

            – hakre
            Sep 18 '17 at 18:19
















          32












          32








          32







          The system stores the .desktop files in /usr/share/applications/. Unfortunately, if you open that folder in nautilus the .desktop files appears with the icon specified in the file and with the file name called out within the file. You also won't be allowed to edit these files by clicking on them and selecting edit.



          To edit these files, you need to open that folder within a terminal window. Doing an ls command will show all the .desktop files with their actual names. When you locate the .desktop you wish to change, run gksudo gedit {file-name}.desktop.



          It's normal practice to keep any .desktop files you create or edit in your home folder ~/.local/share/applications.






          share|improve this answer















          The system stores the .desktop files in /usr/share/applications/. Unfortunately, if you open that folder in nautilus the .desktop files appears with the icon specified in the file and with the file name called out within the file. You also won't be allowed to edit these files by clicking on them and selecting edit.



          To edit these files, you need to open that folder within a terminal window. Doing an ls command will show all the .desktop files with their actual names. When you locate the .desktop you wish to change, run gksudo gedit {file-name}.desktop.



          It's normal practice to keep any .desktop files you create or edit in your home folder ~/.local/share/applications.







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Mar 31 '12 at 4:35









          jokerdino

          32.8k21120187




          32.8k21120187










          answered Mar 31 '12 at 4:18









          fragosfragos

          2,68721623




          2,68721623













          • Running from the terminal can be handier for some, but it is also possible to drag from nautilus into gedit or another text editor.

            – Jon Hanna
            May 1 '14 at 21:40











          • what's the point of the directory "~/.local/share/applications"? Files there don't seem to be used, not I cannot add them as "shortcut" to Unity.

            – Malachiasz
            Feb 8 '15 at 15:14






          • 2





            @Malachiasz Actually, the *.desktop files from ~/.local/share/applications are reloaded when session restarts. So, log out and log back in. Note that these are specific to that user.

            – akshay2000
            Mar 21 '15 at 7:11











          • I also found this Q&A here on site useful: How to force Unity reload ~/.local/share/applications/

            – hakre
            Sep 18 '17 at 18:19





















          • Running from the terminal can be handier for some, but it is also possible to drag from nautilus into gedit or another text editor.

            – Jon Hanna
            May 1 '14 at 21:40











          • what's the point of the directory "~/.local/share/applications"? Files there don't seem to be used, not I cannot add them as "shortcut" to Unity.

            – Malachiasz
            Feb 8 '15 at 15:14






          • 2





            @Malachiasz Actually, the *.desktop files from ~/.local/share/applications are reloaded when session restarts. So, log out and log back in. Note that these are specific to that user.

            – akshay2000
            Mar 21 '15 at 7:11











          • I also found this Q&A here on site useful: How to force Unity reload ~/.local/share/applications/

            – hakre
            Sep 18 '17 at 18:19



















          Running from the terminal can be handier for some, but it is also possible to drag from nautilus into gedit or another text editor.

          – Jon Hanna
          May 1 '14 at 21:40





          Running from the terminal can be handier for some, but it is also possible to drag from nautilus into gedit or another text editor.

          – Jon Hanna
          May 1 '14 at 21:40













          what's the point of the directory "~/.local/share/applications"? Files there don't seem to be used, not I cannot add them as "shortcut" to Unity.

          – Malachiasz
          Feb 8 '15 at 15:14





          what's the point of the directory "~/.local/share/applications"? Files there don't seem to be used, not I cannot add them as "shortcut" to Unity.

          – Malachiasz
          Feb 8 '15 at 15:14




          2




          2





          @Malachiasz Actually, the *.desktop files from ~/.local/share/applications are reloaded when session restarts. So, log out and log back in. Note that these are specific to that user.

          – akshay2000
          Mar 21 '15 at 7:11





          @Malachiasz Actually, the *.desktop files from ~/.local/share/applications are reloaded when session restarts. So, log out and log back in. Note that these are specific to that user.

          – akshay2000
          Mar 21 '15 at 7:11













          I also found this Q&A here on site useful: How to force Unity reload ~/.local/share/applications/

          – hakre
          Sep 18 '17 at 18:19







          I also found this Q&A here on site useful: How to force Unity reload ~/.local/share/applications/

          – hakre
          Sep 18 '17 at 18:19













          4














          Some additional details to supplement the other answers:



          Typically, .desktop files for packages will be located in /usr/share/applications.



          If you want, you could copy one to ~/.local/share/applications and edit it there without needing sudo. Items in ~/.local/share/applications will override matching items in /usr/share/applications and /usr/local/share/applications, but are only visible to your user.



          Alternatively, you could place an edited copy in /usr/local/share/applications where it will override any in /usr/share/applications while also being visible to the entire system.



          Note that you should not edit the .desktop files in /usr/share/applications directly; any changes you make will be automatically overwritten when the application is updated by the package manager.



          Extracted from here






          share|improve this answer


























          • +1, most complete answer out of all of them

            – Jon Bentley
            Feb 19 at 0:22
















          4














          Some additional details to supplement the other answers:



          Typically, .desktop files for packages will be located in /usr/share/applications.



          If you want, you could copy one to ~/.local/share/applications and edit it there without needing sudo. Items in ~/.local/share/applications will override matching items in /usr/share/applications and /usr/local/share/applications, but are only visible to your user.



          Alternatively, you could place an edited copy in /usr/local/share/applications where it will override any in /usr/share/applications while also being visible to the entire system.



          Note that you should not edit the .desktop files in /usr/share/applications directly; any changes you make will be automatically overwritten when the application is updated by the package manager.



          Extracted from here






          share|improve this answer


























          • +1, most complete answer out of all of them

            – Jon Bentley
            Feb 19 at 0:22














          4












          4








          4







          Some additional details to supplement the other answers:



          Typically, .desktop files for packages will be located in /usr/share/applications.



          If you want, you could copy one to ~/.local/share/applications and edit it there without needing sudo. Items in ~/.local/share/applications will override matching items in /usr/share/applications and /usr/local/share/applications, but are only visible to your user.



          Alternatively, you could place an edited copy in /usr/local/share/applications where it will override any in /usr/share/applications while also being visible to the entire system.



          Note that you should not edit the .desktop files in /usr/share/applications directly; any changes you make will be automatically overwritten when the application is updated by the package manager.



          Extracted from here






          share|improve this answer















          Some additional details to supplement the other answers:



          Typically, .desktop files for packages will be located in /usr/share/applications.



          If you want, you could copy one to ~/.local/share/applications and edit it there without needing sudo. Items in ~/.local/share/applications will override matching items in /usr/share/applications and /usr/local/share/applications, but are only visible to your user.



          Alternatively, you could place an edited copy in /usr/local/share/applications where it will override any in /usr/share/applications while also being visible to the entire system.



          Note that you should not edit the .desktop files in /usr/share/applications directly; any changes you make will be automatically overwritten when the application is updated by the package manager.



          Extracted from here







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Feb 11 at 22:12









          Kevin Bowen

          14.6k155970




          14.6k155970










          answered Nov 21 '18 at 15:50









          Sopalajo de ArrierezSopalajo de Arrierez

          3932718




          3932718













          • +1, most complete answer out of all of them

            – Jon Bentley
            Feb 19 at 0:22



















          • +1, most complete answer out of all of them

            – Jon Bentley
            Feb 19 at 0:22

















          +1, most complete answer out of all of them

          – Jon Bentley
          Feb 19 at 0:22





          +1, most complete answer out of all of them

          – Jon Bentley
          Feb 19 at 0:22


















          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%2f117341%2fhow-can-i-find-desktop-files%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

          How to make a Squid Proxy server?

          第一次世界大戦

          Touch on Surface Book