This article will guide you through the process of accessing the Ubuntu instance via Remote Desktop Protocol (RDP).


Remote Desktop Protocol is a technology developed by Microsoft for remotely accessing and controlling computers over a network. It allows users to interact with a remote computer's graphical desktop as if they were physically present, transmitting desktop visuals to their local machine while sending keyboard and mouse inputs back to the remote system.


Prerequisites

  1. Create an Instance on your preferred location.

  2. Then, you would need to open inbound TCP traffic on port 3389 to allow RDP connections. So, create Security Group on the same location with TCP port 3389 and then add your Instance to the Security Group.

    • For the guide on how to create a Security Group, please click here.

  3. Log into the Instance


Install XFCE (Desktop Environment) & XRDP (RDP server) in the instance

 

Update list of packages

sudo apt update


Install newer versions of the packages that are already installed

sudo apt update -y


Install the XFCE Desktop Environment

sudo apt install xfce4 xfce4-goodies


Install XRDP (RDP server)

sudo apt install xrdp


Enable XRDP service to start on boot

sudo systemctl enable xrdp


Check the status of XRDP service

sudo systemctl status xrdp


Change password of ubuntu user

sudo passwd ubuntu

You will be prompted to enter and verify a password.


Create .xsession file in /home/ubuntu directory

touch .xsession


Open .xsession file in Vim editor

sudo vim .xsession

Add xfce4-session in .xsession file and Save & Exit the file


Restart the XRDP service

sudo systemctl restart xrdp


Check the status of XRDP service

sudo systemctl status xrdp

After this, open Microsoft Remote Desktop client on your local machine.

  1. Click on the "+" button to add a new connection.

  2. In the "PC Name" field, enter the public IP address of your Ubuntu instance.

  3. Click "Save" to save the connection settings.

  4. Now, you should see your Ubuntu RDP connection listed in the Microsoft Remote Desktop application. Double-click on it to initiate the RDP connection.

  5. You may receive a security warning, click "Continue" to proceed.

  6. Provide your username as ubuntu, and password (which you set earlier) when prompted.

  7. The RDP session should now connect, and you will have access to the Ubuntu desktop from your local system.

  8. Once you are connected, you will see the default XFCE Desktop like in the image below.

    Screen of the default XFCE Desktop

Add a caption and alt text here please!