NiViewer: 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/NiViewer - from package: openni-examples

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

On Debian possible default full paths are:

/usr/bin/NiViewer - from package: openni-utils

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