oops - I pasted the one that had the eval removed for debugging :) the if statement should read:
if [[ ${a[1]} =~ $regex ]] ; then init="sudo -H -u ${a[0]} DISPLAY=${a[1]} gsynaptics-init" eval "${init}" fi
oops - I pasted the one that had the eval removed for debugging :) the if statement should read:
if [[ ${a[1]} =~ $regex ]] ; then
init="sudo -H -u ${a[0]} DISPLAY=${a[1]} gsynaptics-init"
eval "${init}"
fi