(In reply to Patrick Ohly from comment #4) > I'm going to use this instead Did this happen? > if which dbus-send >/dev/null 2>&1; then You might want if command -v dbus-send >/dev/null; then which I believe is guaranteed to work by POSIX.1-2008 (and usually a shell builtin in practice), whereas which(1) is commonly available but not part of any standard that I know of.