How can I find *.desktop files?

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"

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.


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