Ubuntu – Nautilus description versus /usr/share/applications file directory

12.10desktopnautilus

When using Nautilus and I navigate to the /usr/share/applications directory I get a listing of the meta data that is extracted from all of the .desktop files that live in that directory.

So the file in my example called "Oracle Java 7 Runtime" in Nautilus translates to the file JB-java.desktop which I took a wild guess at. In Nautilus the properties dialog does not reveal the name of that file, so its a hit and miss approach to get the file name.

Is there a better way? Short of looking for the string "Oracle Java 7 Runtime" in all of the files in the directory which is a bit clumsy.

Best Answer

The reply by @green7 is OK if you like the terminal.

However, this can be done directly from Nautilus, although it requires a script.

  1. I have written the script for you. I don't know how to attach a script to this answer, so please download it from my file area.
  2. Save this file to the following folder:
    ~/.gnome2/nautilus-scripts
    This means the folder nautilus-scripts within .gnome2 inside your home folder. Note the . in front of .gnome2; this means it is a hidden file, and you need to press Ctrl+H within Nautilus to be able to see it. If the nautilus-scripts folder doesn't exist, create it.
  3. Once you have saved the script there, you need to make it executable. Right-click the file in Nautilus, select Properties > Permissions > Allow executing file as program > Close.
  4. Finally, you have to close Nautilus and re-open it (you may have to log out and in again, although I don't think you do).

Now, to use the script, use Nautilus to find those desktop files again. Select one or more of them > right-click > Scripts > Show .desktop name.

An example is shown below.

Example of three desktop files..