dogtail-run-headless-next: command not found

Have You tried accessing the binary with the full path?

Maybe Your $PATH variable doesn't contain the default paths? echo $PATH should give something like:

[root@server ~]# echo $PATH
/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin

If it's empty, You may set the PATH variable with this command

export PATH="/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin"

On Debian possible default full paths are:

/usr/bin/dogtail-run-headless-next - from package: python-dogtail

You may install the required package with command apt-get install {package}
Error in other languages:
dogtail-run-headless-next: bevel nie gevind nie
dogtail-run-headless-next: comandă negăsită
dogtail-run-headless-next: comando não encontrado
dogtail-run-headless-next: commande introuvable
dogtail-run-headless-next: command not found
dogtail-run-headless-next: käsku ei ole
dogtail-run-headless-next: không tìm thấy lệnh
dogtail-run-headless-next: komanda nerasta
dogtail-run-headless-next: Kommando nicht gefunden.
dogtail-run-headless-next: kommandot finns inte
dogtail-run-headless-next: komut yok
dogtail-run-headless-next: nie znaleziono polecenia
dogtail-run-headless-next: níor aimsíodh an t-ordú
dogtail-run-headless-next: no se encontró la orden
dogtail-run-headless-next: no s'ha trobat l'ordre
dogtail-run-headless-next: opdracht niet gevonden
dogtail-run-headless-next: parancs nem található
dogtail-run-headless-next: perintah tidak ditemukan
dogtail-run-headless-next: príkaz nenájdený
dogtail-run-headless-next: příkaz nenalezen
dogtail-run-headless-next: команда не найдена
dogtail-run-headless-next: командата не е открита
dogtail-run-headless-next: 命令找不到
dogtail-run-headless-next: コマンドが見つかりません