Print XDG Desktop Definition for Application

Update Nov 3 2024: There is an update to this article that provides this script as commandline utility. There is also a Git repository. For an application given by “application name” or “executable name”, output the corresponding .desktop file, if any: #!/bin/sh IFS=”:” xdg_data_dirs=${XDG_DATA_DIRS:-/usr/local/share:/usr/share} search=$1 for i in $xdg_data_dirs ; do a=”$i/applications” [ -d $a […]