You are not logged in.
Pages: 1
when i use dmenu i get this in tty1 but don't understand why, because i don't have a /opt/kde/bin dir for example, i don't know where this comes, dmenu_path uses the ~/.dmenu_cache file, but that is only a huge list of what i have in /usr/bin or my path i think
my ~/.bashrc PATH line:
PATH=$PATH:${HOME}/bin:/sbin:/usr/sbin
export CDPATH=.:/home/aleyscha:/sdb5/Video:/sdb5/Audio/Music:/sda6/Movies:/downloads:/sdc1/Video
export PATH=$PATH:/usr/local/bin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/X11R6/bin:/opt/bin:~/bin
export LC_ALL=C
/usr/bin/dmenu_path: line 17: cd: /usr/X11R6/bin: No such file or directory
/usr/bin/dmenu_path: line 17: cd: /opt/bin: No such file or directory
/usr/bin/dmenu_path: line 17: cd: /opt/kde/bin: No such file or directory
/usr/bin/dmenu_path: line 17: cd: /usr/bin/perlbin/site: No such file or directory
/usr/bin/dmenu_path: line 17: cd: /usr/bin/perlbin/vendor: No such file or directory
/usr/bin/dmenu_path: line 17: cd: /usr/X11R6/bin: No such file or directory
/usr/bin/dmenu_path: line 17: cd: /opt/bin: No such file or directory
/usr/bin/dmenu_path: line 17: cd: /usr/X11R6/bin: No such file or directory
/usr/bin/dmenu_path: line 17: cd: /opt/bin: No such file or directory
/usr/bin/dmenu_path: line 17: cd: /usr/X11R6/bin: No such file or directory
/usr/bin/dmenu_path: line 17: cd: /opt/bin: No such file or directory
/usr/bin/dmenu_path
#!/bin/sh
CACHE=$HOME/.dmenu_cache
IFS=:
uptodate() {
test -f "$CACHE" &&
for dir in $PATH
do
test ! $dir -nt "$CACHE" || return 1
done
}
if ! uptodate
then
for dir in $PATH
do
cd "$dir" &&
for file in *
do
test -x "$file" && echo "$file"
done
done | sort | uniq > "$CACHE".$$ &&
mv "$CACHE".$$ "$CACHE"
fi
cat "$CACHE"
Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away.
-- Antoine de Saint-Exupery
Offline
Well, the error comes from line 17 of your script (it's written in the error message above), namely the 'cd "$dir" &&' command. Apparently you have a bunch of directories in your PATH that don't exist on your system. Some of them you've specified yourself (for instance /usr/X11R6/bin - it's in your .bashrc PATH command), and some others (like /opt/kde/bin) are probably set in your /etc/profile: remember that when you log in, /etc/profile is sourced, and that sources pretty much everything in /etc/profile.d/* - these things tend to set up some paths. So have a look there.
EDIT: if you just want to get rid of the warning and you don't mind having extra stuff in your PATH, you could just delete the 'cd $dir' and replace the 'for' line with
for file in "$dir"/*
(or something similar, i'm not so proficient with precise bash syntax)
EDIT2: I think 'lsx' from http://www.suckless.org/programs/lsx.html does pretty much what your script does (except the uptodate checking).
Last edited by bender02 (2008-10-26 14:53:20)
Offline
Pages: 1