Utility to search for XDG Desktop Files

In my previous article Print XDG Desktop Definition for Application i described a way to search the various „applications“ sub-directories of the known XDG data directories for .desktop-files that match certain search criteria.

The short shell script from that article is now available as a commandline utility, including the usual bells and whistles such as option parsing and a manpage. Also, it now supports more exact control over which directives in the desktop files are searched and which are displayed in the search results.

Here is an example searching for any desktop files containing „firefox“ in their „Name“or „Exec“ directives, displaying the „Name“, „Comment“ and „Exec“ directories of each result:

xdg-desktop-search -v -s Exec -s Name -d Name -d Comment -d Exec firefox

The utility is available here:

Gitea project xdg-desktop-searchLast 2 commits: by Tilman Kranz: 25e7e3f4 add Makefile and manpage by Tilman Kranz: 9e48b481 initial commmit