startx: 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/startx - from package: xorg-x11-xinit

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

On Debian possible default full paths are:

/usr/bin/startx - from package: xinit

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