I want to install a graphical user interface (GUI) in my Amazon Elastic Compute Cloud (Amazon EC2) instance running Amazon Linux 2. How do I do this?
I've just installed TigerVNC on my Fedora 15 machine from the package manager then in terminal (as root): chkconfig vncserver on service vncserver start None gave me errors, so I went back to the Windows 7 machine and fired up the viewer. But after a few seconds i get. Unable to connect to socket: connection timed out(10060).
To install a GUI on your EC2 Linux instance, do the following:
Note: These instructions apply only to Amazon Linux 2. To confirm the version that you're running, run the following command:
For instructions on accessing an EC2 macOS instance using a GUI, see How can I access my Amazon EC2 Mac instance through a GUI?
1. Connect to your instance as EC2-user using SSH.
The instance must be in a public subnet and accessible through a public IP address or an Elastic IP address. Or, you can establish a connection using AWS VPN or AWS Direct Connect that allows you to access your instance through a private IP. These instructions don't apply to environments using a bastion host. For security reasons, traffic to the VNC server is tunneled using SSH. It's a best practice to avoid opening VNC ports in your security groups.
2. Update your instance by running sudo yum update, and then reboot the instance. Failure to update and reboot can lead to unpredictable results when following the steps below.
2. Define MATE as your default desktop.
To define MATE for all users:
To define MATE for the current user only (ec2-user):
1. Install TigerVNC packages:
2. Configure a VNC-specific password containing 6 to 8 characters for this user. When asked if you want to enter a view-only password, press 'n'.
3. Start the VNC Server on display number 1.
Enter the following command to start the VNC Server only once:
Note: Entering this command prevents the service from coming up after a reboot.
Enter the following commands to always start the VNC Server at boot time:
Create a new systemd unit.
Use the sed command to replace all occurrences of USER in the new unit with ec2-user.
Reload the systemd manager configuration.
Enable the service.
Start the service.
1. Install the TigerVNC software on your local computer, if it's not already installed. TigerVNC is available for Linux, Windows, and macOS. See the TigerVNC website to access the download.
2. On your local computer, use SSH to connect to your instance while creating a tunnel to forward all traffic on local port 5901/TCP (VNC) to the instance's VNC server:
Connect to your instance using SSH.
Use the -L parameter to enable port forwarding. Replace PEM_FILE with the path for your private key. Replace INSTANCE_IP with your instance's public or private IP, as appropriate.
Open the connection.
3. Open the VNC Client on your local computer. When asked for the VNC server hostname, enter localhost:1 and then connect to it.
4. Enter the VNC password you set up in step 2 of the Install TigerVNC section. If an alert appears stating that the connection isn't secure, disregard it. Although VNC data is unencrypted by default, you're accessing the VNC server using an encrypted SSH tunnel.
Your MATE desktop environment appears.
AWS currently doesn't provide web browsers such as Mozilla Firefox or Google Chromium in Amazon Linux 2 repositories. To install one of these browsers, follow the steps below.
Note: AWS doesn't provide support for software installed from third-party sources.
To install Chromium (open-source version of Google Chrome), do the following:
1. Enable the EPEL repository. See the EPEL documentation on the Fedoraproject.org website for more information.
2. Install Chromium packages.
Chromium installs on MATE under Applications, Internet, Chromium Web Browser.
To install Mozilla Firefox (current user only), do the following:
1. Download the latest Firefox version for Linux 64-bit to your local computer. See the mozilla.org website to access the download.
2. After downloading Firefox, copy the file to your instance.
3. Extract the file contents. The command below indicates that the file is in the ec2-user's home directory. Change the path and the Firefox version as needed.
4. Using vim or your favorite editor, create a desktop icon. Create the file ~/Desktop/Firefox.desktop with the contents as shown in the following example.
5. Use the icon you created in step 4 on your desktop to launch Firefox.
TigerVNC was originally based on the (never-released) VNC 4 branch ofTightVNC. More informationregarding the motivation for creating this project can be found in theprojectannouncement.
The latest release of TigerVNC can be downloaded from ourGitHub releasepage. Besides the source code we also provide self-contained binariesfor 64-bit and 32-bit Linux, installers for 64-bit and 32-bit Windows anda universal binary for Intel-based Macs. We also try to provide packagesfor various distributions when we easily can.
Pre-release builds of the experimental next-generation code can befound here.
TigerVNC is also provided with many distributions, such asFedora,OpenSUSE,FreeBSD,Arch Linux,Red Hat Enterprise Linux andSUSE Linux Enterprise.
The project has three mailing lists:
Moderated announcement list for new releases and other important news.
Support and general discussion list for users of TigerVNC. Please use this list for bug reports.
Discussion list for TigerVNC developers. This list can be used for patch submissions and other development ideas.
The man pages for the different programs are available here in HTML form:
This documentation is for the Unix programs but is mostly relevant forthe equivalent Windows programs as well.
If there is an issue you'd really like to get fixed, or if you're aprogrammer that could use some extra cash, head over toBountysourcefor information on how to trade bugs and features for the almighty buck.You can also make a general donation, which we (the TigerVNC admins)can distribute as bounties on existing issues.
A community maintained version of the VNC/RFB specification is maintained by the rfbproto project.
Assorted documentation about TigerVNC and development can be found inthe developmentsection of the wiki.