SSH startx command not working

For anyone still getting stuck with this issue. I found these two posts helpful for getting startx and VNC viewer up and running.

Also, running sudo startx seemed to hang it for VNC connection.