XRP to remote Gnome on Ubuntu 22.04

Installation of XRP and Gnome

XRP to remote Gnome on Ubuntu 22.04
Page content

Introduction

We will be turning a Command Line Interface (CLI) Redhat 9 server hosted at Amazon on EC2 into a full Xwindows based workstation that you can use Remote Desktop Protocal (RDP) to using xRDP.

Installation

Install the updates

sudo apt update -y
sudo apt upgrade -y
# Kernel Updates wanted a reboot
sudo init 6

Install ubuntu-desktop (Gnome, Xwindows, etc)

sudo apt-get install ubuntu-desktop -y

Install XRDP

sudo apt install xrdp net-tools -y
# insure xrpd on on ipv4
sudo sed -i 's/^port=3389/port=tcp:\/\/:3389/g' /etc/xrdp/xrdp.ini
sudo systemctl enable xrdp.service
sudo systemctl start xrdp.service
# had to do extra start/stop to get it to switch to ipv4 also
sudo systemctl stop xrdp.service
sudo systemctl start xrdp.service
sudo systemctl status xrdp.service
sudo netstat -antp | grep xrdp

Example of successful installation:

xrdp image

Assign a regular password to the user for RDP

sudo passwd ubuntu

Configure Firewall

If you have firewalld running, open the RDP port on RHEL, note on the EC2 instance we did this on, firewalld was not even installed because there is also an Amazon firewall.

# Check if firewall is enabled
sudo ufw status
# Add firewall rule
sudo ufw allow 3389
# Verify
sudo ufw status numbered

On Amazon EC2, modify the security group to allow RDP Traffic, you should be as restrictive as possible on which Internet Protocal (IP) Addresses are allowed to access your RDP Port.

xrdp image

Connect with RDP

Connect to your ubuntu server using Amazon’s external IP Address and the account you setup the password

xrdp image

The first time connecting will prompt you for the password

xrdp image

Successful RDP Session to Ubuntu!

xrdp image