You are not logged in.
Pages: 1
Topic closed
I'm using scrotwm, which has dmenu as it's launcher. I have ~/bin added to $PATH in ~/.bashrc. It works fine in a shell. dmenu isn't getting the scripts there, which it says it will in the the manual.
What am I missing?
Offline
The WM is irrelevant here. The important part is the "dmenu_run" command. It is a shell script responsible for scraping $PATH. Looking at the script's source, it looks like it should work.
Did you remember to log out and back in after changing your $PATH?
Offline
lol. Yeah, about a hundred times.
I've had ~/bin in $PATH almost since I installed Arch. I doubt my script is different than your's, and it looks like it should work to me too, but I'm not pro, so here it is for review.
#!/bin/sh
CACHE=${XDG_CACHE_HOME:-"$HOME/.cache"}/dmenu_run
(
IFS=:
if test "`ls -dt $PATH "$CACHE" 2> /dev/null | sed 1q`" != "$CACHE"; then
mkdir -p "`dirname "$CACHE"`" && lsx $PATH | sort -u > "$CACHE"
fi
)
cmd=`dmenu "$@" < "$CACHE"` && exec sh -c "$cmd"
Last edited by ninjaaron (2011-09-24 21:36:05)
Offline
Deleting ~/.cache/dmenu_run fixed it for me. I guess the cache file isn't updating properly.
Offline
Setting $PATH in ~/.bashrc doesn't ensure your WM/dmenu will inherint this env.
A more relevant question to ask is, "How do you login?" Usually the env exported in ~/.bash_profile or ~/.profile are available in your X applications.
Launch dmenu_run as you normally do, then in dmenu, type
echo $PATH > /tmp/path
Then in a terminal, `cat /tmp/path` to see what that $PATH is.
Last edited by lolilolicon (2011-10-04 10:24:35)
This silver ladybug at line 28...
Offline
Looks like path for dmenu is this.
/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/usr/bin/vendor_perl:/usr/bin/core_perl
Same as my shell path, minus ~/bin. Hmm... I login with slim, which uses my .xinitrc. If I export a new value for $PATH in my .xinitrc, will that do anything?
This may also explain whey aurbuild keeps on telling me that $EDITOR isn't defined when it's also in my .bashrc (or .zshrc, as it has recently become).
Offline
Looks like path for dmenu is this.
/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/usr/bin/vendor_perl:/usr/bin/core_perlSame as my shell path, minus ~/bin. Hmm... I login with slim, which uses my .xinitrc. If I export a new value for $PATH in my .xinitrc, will that do anything?
This may also explain whey aurbuild keeps on telling me that $EDITOR isn't defined when it's also in my .bashrc (or .zshrc, as it has recently become).
Either exporting $PATH (and $EDITOR etc.) in .xinitrc or .bash_profile should do it.
The reason is SLiM's login command as set in /etc/slim.conf
login_cmd exec /bin/bash --norc -login ~/.xinitrc %session
This silver ladybug at line 28...
Offline
The dmenu_run script does NOT use Bash so your bash settings will not be used
Linux is simple, but it takes a genius to understand it
Offline
Please note that you are posting in a 9 year old thread so that might've very well been true back in those days. Don't necrobump
https://wiki.archlinux.org/index.php/Co … bumping%22
Closing.
Offline
Pages: 1
Topic closed