diff --git a/nvidia-xinitrc b/nvidia-xinitrc index b4f733c..bf3e2ac 100644 --- a/nvidia-xinitrc +++ b/nvidia-xinitrc @@ -39,6 +39,6 @@ if [ -f "$userxinitrc" ]; then sh ${userxinitrc} $# else if [ $# -gt 0 ]; then - $* + "$*" fi fi diff --git a/nvidia-xrun b/nvidia-xrun index 3a5c54c..23189f0 100644 --- a/nvidia-xrun +++ b/nvidia-xrun @@ -45,14 +45,20 @@ NEWDISP=":$XNUM" if [ ! -z "$*" ] # generate exec line if arguments are given then - # test if executable exists - if [ ! -x "$(which $1 2> /dev/null)" ] + # test if executable exists in path + if [ -x "$(which $1 2> /dev/null)" ] then + # generate exec line + EXECL="$(which $1)" + # test if executable exists on disk + elif [ -e "$(realpath "$1")" ] + then + # generate exec line + EXECL="$(realpath "$1")" + else echo "$1: No such executable!" exit 1 fi - # generate exec line - EXECL="$(which $1)" shift 1 EXECL="$EXECL $*" else # prepare to start new X sessions if no arguments passed