Рано вам играться в kali, если такая проблема ставит в тупик
Читаем текст скрипта
if [ ! "${DISPLAY:-}" ]; then # Assure display is available.
echo -e "\\033[31mAborted, X (graphical) session unavailable.\\033[0m"; exit 2
fi
Гуглим и читаем
первую ссылку
"If you are not using a graphical environment (i.e. you are logging in on the system console with no windows etc; or you are logging in remotely from a text-only terminal over SSH or similar, such as from a Windows computer running PuTTY) then no GUI is involved, and DISPLAY will typically be unset."
В переводчик сходите сами