I compiled it over SSH logged in as a regular user, not sure if I had to use sudo to get it to build, I VNC into it as the same user. I executed it the same way, sudo ./hactool_linux. Env seems to be pretty similar, SHELL=/bin/bash USER=pi TERM=xterm