j4-dmenu-desktop icon indicating copy to clipboard operation
j4-dmenu-desktop copied to clipboard

Honor $XDG_DATA_DIRS

Open Lykos153 opened this issue 3 years ago • 2 comments

Desktop applications installed via nix on a per-user basis are currently not found. I have XDG_DATA_DIRS set to $HOME/.nix-profile/share but j4-dmenu-desktop doesn't see it. I can set XDG_DATA_HOME to this path but then I lose access to the apps in .local/share/applications. Currently I'm helping myself with symlinks, but it would be great if j4-dmenu-desktop supported this variable.

$XDG_DATA_DIRS defines the preference-ordered set of base directories to search for data files in addition to the $XDG_DATA_HOME base directory. The directories in $XDG_DATA_DIRS should be seperated with a colon ':'. https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html

Lykos153 avatar Jan 13 '21 21:01 Lykos153

I'm not the most familiar with the code here but is this already implemented?

muni-corn avatar Aug 07 '21 05:08 muni-corn

I also tried to get Nix to work with j4-dmenu-desktop and found that when I set XDG_DATA_DIRS=$HOME/.nix-profile/share:/usr/share the desktop entry in /usr/share/applications is found. After adding .nix-profile to the end of XDG_DATA_DIRS the correct entry was found. So it seems that later path entries are preferred to earlier ones.

If @Lykos153 got wrong (global) entries instead of no entries, this could be the same problem.

lvanengelen avatar Nov 05 '21 18:11 lvanengelen