How do I install a GUI on Lightsail?

2 minute read
0

I want to install a graphical user interface (GUI) on Amazon Lightsail.

Resolution

Install a GUI on Lightsail

Complete the following steps:

  1. Open the Lightsail Dashboard and select your Lightsail instance.

  2. Choose Networking.

  3. Under IPv4 Firewall, choose Add Rules, and then add the following rule:

    Application: Custom Protocol: TCP Port or Range: 3389
  4. Choose Create.

  5. Use SSH to connect to Lightsail.

  6. Confirm the operating system (OS):

    # cat /etc/os-release
  7. Install Xfce 4 and xrdp:

    # sudo apt-get update; sudo apt-get -y install xrdp xfce4
  8. Set Xfce as the user's default window manager:

    echo "xfce4-session" > /home/example-user/.Xclients chown example-user: /home/example-user/.Xclients; chmod u+x /home/example-user/.Xclients

    Note: Replace example-user with your username.

  9. Activate xrdp:

    sudo systemctl enable xrdp; sudo systemctl start xrdp
  10. (Optional) If Uncomplicated Firewall (UFW) is installed, then add a firewall rule to allow Transmission Control Protocol (TCP) port 3389:

    $ sudo su -  
    # if ! /usr/sbin/ufw status | grep inactive > /dev/null 2>&1;then /usr/sbin/ufw allow 3389/tcp;fi

    Note: To check the status of UFW, run the following command:

    sudo ufw status
  11. Set the user password:

    sudo passwd example-user

    Note: Replace example-user with your username.

Connect to Lightsail with the GUI

Complete the following steps:

  1. Choose a remote desktop client.
  2. Enter the IP address.
  3. Enter the user ID and password.

Note: If you receive a "Failed to execute child process "dbus-launch" (No such file or directory)" error when you connect, then install dbus-x11:

sudo apt-get install dbus-x11
AWS OFFICIAL
AWS OFFICIALUpdated 2 months ago