so /usr/local/bin is before /usr/bin in my user's path.
But what about root's path? Maybe /usr/bin/lxlock will be used that way?
-----
/usr/bin/lxlock:
...
# Try to lock the screen with thos applications (in this order) :
# lighdtm, xscreensaver, gnome-screensaver, slock, slock, i3lock and xdg-screensaver
if test x"`which dm-tool 2>/dev/null`" != x""; then
dm-tool switch-to-greeter
elif `dbus-send --system --print-reply --dest=org.freedesktop.DBus /org/freedesktop/DBus org.freedesktop.DBus.GetNameOwner string:org.freedesktop.DisplayManager > /dev/null 2>&1` ; then
seat="$XDG_SEAT_PATH"
dbus-send --system --print-reply --dest=org.freedesktop.DisplayManager "$seat" org.freedesktop.DisplayManager.Seat.SwitchToGreeter \
2> /dev/null
elif test x"`which xscreensaver-command 2>/dev/null`" != x""; then
xscreensaver-command -lock
elif test x"`which gnome-screensaver-command 2>/dev/null`" != x""; then
gnome-screensaver-command --lock
elif test x"`which slock 2>/dev/null`" != x""; then
slock
elif test x"`which xlock 2>/dev/null`" != x""; then
xlock $*
elif test x"`which i3lock 2>/dev/null`" != x""; then
i3lock -d
# In the end, try to fallback to xdg-screensaver. Don't do at the first try,
# because if lxlock is called by xdg-screensaver, we may enter a loop.
else
xdg-screensaver lock
fi
exit 0
echo $PATH lightdm/ lightdm: /usr/local/ sbin:/usr/ local/bin: /usr/sbin: /usr/bin: /sbin:/ bin:/usr/ games:/ usr/local/ games
/usr/lib/
so /usr/local/bin is before /usr/bin in my user's path.
But what about root's path? Maybe /usr/bin/lxlock will be used that way?
-----
/usr/bin/lxlock:
...
# Try to lock the screen with thos applications (in this order) :
# lighdtm, xscreensaver, gnome-screensaver, slock, slock, i3lock and xdg-screensaver
if test x"`which dm-tool 2>/dev/null`" != x""; then org.freedesktop .DBus /org/freedeskto p/DBus org.freedesktop .DBus.GetNameOw ner string: org.freedesktop .DisplayManager > /dev/null 2>&1` ; then "$XDG_SEAT_ PATH" org.freedesktop .DisplayManager "$seat" org.freedesktop .DisplayManager .Seat.SwitchToG reeter \ command 2>/dev/null`" != x""; then r-command -lock er-command 2>/dev/null`" != x""; then screensaver- command --lock
dm-tool switch-to-greeter
elif `dbus-send --system --print-reply --dest=
seat=
dbus-send --system --print-reply --dest=
2> /dev/null
elif test x"`which xscreensaver-
xscreensave
elif test x"`which gnome-screensav
gnome-
elif test x"`which slock 2>/dev/null`" != x""; then
slock
elif test x"`which xlock 2>/dev/null`" != x""; then
xlock $*
elif test x"`which i3lock 2>/dev/null`" != x""; then
i3lock -d
# In the end, try to fallback to xdg-screensaver. Don't do at the first try,
# because if lxlock is called by xdg-screensaver, we may enter a loop.
else
xdg-screensaver lock
fi
exit 0