dogtail-run-headless: 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 CentOS possible default full paths are:

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

You may install the required package with command yum install {package}

On Debian possible default full paths are:

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

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