The top-level script for installing the GUI is listed below. The first thing it does after configuring a few variables is run the script from step 1 above. Because I developed it to function on a conventional ec2 instance, or AWS EMR, and as root or as ec2-user, it comes with some extra baggage. The necessary stages are as follows:
libXfont must be installed before tiger-vnc-server can be used.
the VNC server configuration file should be installed
in the user's home directory, make a.vnc directory
Install the xstartup file in the.vnc directory, as well as a dummy passwd file.
launch the VNC server