Open shackra opened 1 year ago
I tried setting my XDG_DATA_DIRS
as follows and it somehow broke the startup of my session:
if [ -e "$HOME/.nix-profile/share/" ]; then
export XDG_DATA_DIRS="$HOME/.nix-profile/share:$XDG_DATA_DIRS"
fi
this, however, works if I export
on a terminal and run ulauncher
or dmenu
.
I experienced the same problem, which was because I was running ulauncher through systemd. Systemd sets PATH environment variable to some standard value for the service, as described here.
My solution was to write a small wrapper script to setup the PATH variable before starting ulauncher, as such:
systemd.user.services.ulauncher = {
Unit = {
Description = "Linux Application Launcher";
Documentation = [ "https://ulauncher.io/" ];
};
Service = {
Type = "Simple";
Restart = "Always";
RestartSec = 1;
ExecStart = pkgs.writeShellScript "ulauncher-env-wrapper.sh" ''
export PATH="''${XDG_BIN_HOME}:$HOME/.nix-profile/bin:/etc/profiles/per-user/$USER/bin:/nix/var/nix/profiles/default/bin:/run/current-system/sw/bin"
export GDK_BACKEND=x11
exec ${pkgs.ulauncher}/bin/ulauncher --hide-window
'';
};
Install = {
WantedBy = [ "graphical-session.target" ];
};
};
Describe the bug
Ulauncher fails to display installed apps from NixOS
Steps To Reproduce
Install
spotify
,notion-app-enhance
orminecraft-launcher
.Expected behavior
I should be able to invoke Ulauncher and see any of the above apps, it can read
.desktop
files from the usual locationsScreenshots
If applicable, add screenshots to help explain your problem.
Additional context
I use an script to symlink what's on
/home/jorge/.nix-profile/share/applications
to~/.local/share/applications
, take a look:Despite this, ulauncher still fails to show these symlinked apps.
Metadata
Please run
nix-shell -p nix-info --run "nix-info -m"
and paste the result.