I am using NixOS.
I run wofi with: wofi --insensitive --show drun
.
Now if I want to run an application e.g. org.gnome.Nautilus
it perfectly finds the desktop-file and launches it.
There is one problem though:
The environment variable $PATH
is: PATH=/nix/store/jd1y449cf66yx5d1hwyjvc4562b1p1am-coreutils-9.0/bin:/nix/store/jjvw20r6pz3ff7pn91yhvfx8s7izsqan-findutils-4.8.0/bin:/nix/store/df3ff57sbkgbdhc4ar19zs4y0hrhggii-gnugrep-3.7/bin:/nix/store/bpg0ia8nkavzw7s66avi1f9nz72i1p3r-gnused-4.8/bin:/nix/store/w4my56mxgknxk5m0vilgizi37iyibmvb-systemd-249.7/bin:/nix/store/jd1y449cf66yx5d1hwyjvc4562b1p1am-coreutils-9.0/sbin:/nix/store/jjvw20r6pz3ff7pn91yhvfx8s7izsqan-findutils-4.8.0/sbin:/nix/store/df3ff57sbkgbdhc4ar19zs4y0hrhggii-gnugrep-3.7/sbin:/nix/store/bpg0ia8nkavzw7s66avi1f9nz72i1p3r-gnused-4.8/sbin:/nix/store/w4my56mxgknxk5m0vilgizi37iyibmvb-systemd-249.7/sbin
In comparison with bemenu
it is: PATH=/run/wrappers/bin:/home/felix/.nix-profile/bin:/etc/profiles/per-user/felix/bin:/nix/var/nix/profiles/default/bin:/run/current-system/sw/bin:/home/felix/.local/bin/
this is specially problematic for nautilus. if the binaries/executables are not found in $PATH
, then the applications can not be used to launch e.g. mpv
with a selected movie from nautilus.
So with bemenu
it works perfectly, but with wofi
it does not.
this can be prevented by using
drun-print_command=true
in combination with:wofi --insensitive --show drun | xargs swaymsg exec --
. Works, but feels weird for me.I think this issue can be closed.
I'm not super familiar with how nix works. Programs launched by wofi should inherit its environment and in most distros that is the desired behavior. While this could be closed due to the work around and the fact that I think it's nix specific I am a tad curious as to the cause if you're more familiar with how nix handles environments.
when sway is launched the
$PATH
is set to the first mentioned variable. Not sure if it is the same when launching with GDM/...I think for launching sway there is no perfect method yet.
I think I'm running into the same issue. Blender wasn't launching through wofi, but launched fine with gtk-launch and from the command line. ~stunkymonkey's workaround worked for me. I suspect this is due to missing environment variables.