Monday, April 29, 2024
 Popular · Latest · Hot · Upcoming
2
rated 0 times [  2] [ 0]  / answers: 1 / hits: 547  / 3 Years ago, sun, november 7, 2021, 3:04:16

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.


More From » 12.10

 Answers
5

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..


[#32293] Tuesday, November 9, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
zebrla

Total Points: 356
Total Questions: 110
Total Answers: 120

Location: Sudan
Member since Tue, Aug 3, 2021
3 Years ago
;