title: How to install a GUI on Amazon AWS EC2 or EMR with the Amazon AMI
body: <p>I have a need to run an application that requires a GUI interface to start and configure.  I also need to be able to run this application on Amazon's EC2 service and EMR service.  The EMR requirement means it has to run on Amazon's Linux AMI.</p>
  
  <p>After extensive searching I've been unable to find any ready made solutions, in particular the requirement to run on Amazon's AMI.  The closest match and most often referenced solution is <a href="https://devopscube.com/setup-gui-for-amazon-ec2-linux/" rel="nofollow noreferrer">here</a>.  Unfortunately it was developed on a RHEL6 instance which differs enough from Amazon's AMI that the solution does not work.</p>
  
  <p>I'm posting my solution below.  Hopefully it will save some others from the many hours of experimentation it took to come up with the right recipe.</p>