How to Install Xrdp on Ubuntu

How to Install Xrdp on Ubuntu

Hello friends, welcome to the Inet 70. In this post, we can get information about how to install xrdp on Ubuntu for managing and accessing all Ubuntu servers, GUJ tools, and software remotely.
In my case, I can use the Ubuntu server for performing this practical or lab. In this tutorial, I can fully inform you about where to purchase VPS servers. Now, let's get some basic information about VPS.

What is VPS?

VPS stands for Virtual Private Server. You can run and use any web application and access the desktop remotely. From the cloud server provider, VPS is a private server that you can rent from the data center. It provides the cloud operating system like Linux, Windows, and macOS. Cloud server service providers offer the best cloud servers at the cheapest price with the best user experience. Now, let's move on to the next step: buying a new VPS.

Where to buy a new VPS?

For buying a new VPS server, you can use any VPS server provider from the given list:

  1. Amazon Web Services
  2. Google Cloud
  3. Microsoft Azure
  4. DigitalOcean (Signup and Get 200$ Credits)
  5. Oracle Cloud

From the given list, you can purchase a new VPS server with high-speed internet connection. You can try the free trial access from the given list. Don't wait for more time and get started with the free trial.

In my case, I can use Amazon Web Services for testing. You can try any provider and follow all my steps. Now, let's start the Xrdp installation process.

Xrdp on Ubuntu

In my case, I can use Amazon EC2 instance with a t2.small size (2 vCPUs and 4 GiBs RAM) for general purpose. After getting the Ubuntu VPS server, you can connect to the VPS server using an SSH client. After connecting, first, you can update and upgrade all Ubuntu packages.

$ sudo apt update && sudo apt upgrade -y

After completing this process, you can add a new user on the Ubuntu server as a super user.

$ adduser #USERNAME $ usermod -a -G sudo,adm #USERNAME

In the above command, replace "#USERNAME" with the name of the user who wants to access it from remote desktop. Fill in all the requirements and add the new user on the Ubuntu server. Now, let's start the Xrdp installation process on Ubuntu.

Install xrdp on Ubuntu

Now, we can start the Xrdp installation process on Ubuntu. First, we need to switch to the newly added user. To switch, use the following command:

$ sudo su - #USERNAME

After switching to the given user, put the following command to install Xrdp on Ubuntu:

Install xrdp on Ubuntu

After following the steps, Xrdp is successfully installed. But we don't have any graphical user interface (GUI) service found on the Ubuntu server. Then, we can install the Xfce4 desktop interface on our Ubuntu server.

Install xfce4 on Ubuntu Server

Xfce is the best performance and lightweight Ubuntu flavor for desktop experience. You can use this as a desktop interface. Now, let's start the installation process on our Ubuntu server. Put the given command to start the installation process:

$ sudo apt-get install xfce4
Install Xfce4 in Ubuntu Server

After putting this command, choose "Yes" or "No" and then press [Y] to start the installation process. This process may take some time, so please wait for it to complete. After that, put the following command to install the Xfce terminal service:

$ sudo apt-get install xfce4-terminal
Install Xfce4 Terminal in Ubuntu

After completing this step, Xrdp is ready to use. Now, we can enable the Xrdp services for access.

Start Xrdp service on Ubuntu Server

This is the last step to set up the Xrdp service. Before restarting the Xrdp service, we need to configure two important steps on our server first. First, we need to configure the SSL-cert user on Xrdp. Put the following command to configure SSL-cert:

$ sudo adduser xrdp ssl-cert

Now, our Xrdp user is secure. Next, we need to allow the firewall rule to access Xrdp over remote desktop.

$ sudo ufw allow 3389/tcp

Our Xrdp server is ready to use. Before using it, restart the Xrdp service.

$ sudo /etc/init.d/xrdp restart

Now, follow the last step to access Xrdp.

Access Xrdp with Remote Desktop

You can use and access this server GUI from any device. Here, I can provide the link for all devices:

  1. Android
  2. Iphone
  3. Windows
  4. Macbook

You can install the software on your device.

0:00
/0:24

run the xrdp with remote desktop

In my case, I can use the Windows operating system. In this system, Remote Desktop software is available. First, click on the search button and search for "Remote Desktop". Open the software and put your IP address of the Ubuntu server, then click on the connect button. Put in the user credentials and access the Ubuntu server GUI. Now, you can enjoy your virtual machine service.

Buy Me A Coffee