This has been driving me nutty for ages.
dmenu_run uses the $SHELL's environment to execute commands through the $SHELL.
So how to add something to the path it sees depends on what your login shell is set to. It seems to also depend on how you log in to the system, in a way I really don't understand (any insight is welcome if you do...).
Still, this seems to be working for several systems.
If it's bash (the default), ~/.bashrc is a likely candidate. Add something like
Code: Select all
export PATH="$HOME/mybinaries:$PATH"
Code: Select all
typeset -U path
path=(~/mybinaries $path)
Whichever your method, you may need to delete ~/cache/dmenu_run (~/.dmenu_cache in older versions) and log out and back in again.
Credit to this page https://faq.i3wm.org/question/2483/howt ... ightdm-i3/ for the ~/.xsessionrc trick, and the Arch wiki for the right Zsh syntax.