How to Install RDP Server for Ubuntu Remote Access

It has been a while that I have switched my old laptop to Ubuntu Linux. And it sits in the basement as a toy for the kids at home. I was going to do some more tech learning with it. One issue I have is that I need to go down to the basement and use it. Also sometimes, I need to use both my current dev laptop and that old one for some joint exercise, I have to get both laptop together. The get around is to install a remote desktop access to the old laptop and a remote access client on my dev laptop, then the access for both computers at the same time can easily be done.

In order for this scheme to work, I need to install a remote desktop server on the old laptop, then a remote desktop client on my dev laptop so that the remote access from my dev laptop to the old laptop can work. Again, the setup of this scheme has some minor issues. At first, I tried to install VNC server on the old laptop. No matter how hard I tried, I couldn't register or run the VNC server on the old laptop. So I decided to install an alternative remote desktop server, the RDP server called XRDP. Turned out the installation is a breeze. And with a good RDP client, the remote access is working perfectly.

Install XRDP Server

To install the XRDP, here are the steps:

The first step is update your OS:

sudo apt update
...
sudo apt upgrade

The next step is installing the XRDP server:

sudo apt install xrdp

Note that for the desktop of the old laptop, I have already installed XFCE desktop so I don't need to install a desktop environment. GNOME should also work. If you have KDE, you might need XFCE desktop env installed.

Next, I need to add the RDP user to a specific group so that remote desktop connection can utilize a SSL cert for secure connection:

sudo adduser xrdp ssl-cert

At this point the XRDP server is already running. I can use the following command to check:

sudo systemctl status xrdp

Since, I change the RDP user (added user to a new group), a restart of RDP server will allow this change to take effect:

sudo systemctl restart xrdp

Afterwards, use the previous command to check:

sudo systemctl status xrdp

The last step of this RDP server setup is to enable this service so that it starts at boot time.

sudo systemctl enable xrdp

This concludes the work on setting up the XRDP server on the older desktop. Next, I need to setup a RDP client to access the old laptop.

Install the RDP Client

Again, I took some issues when I tried to install RDP client. The first client I tried is called "Remmina". This application didn't work for me. There are two issues:

  • The screen resolution of the RDP session is fixed on 640x480. No matter how I tried, it is fixated at this configuration.
  • The user interaction is way too slow. At first I thought this is due to network speed. Turned out it was an application issue.

Then I tried another client called KRDC. this application turn out to be the perfect client for what I intended to do. Both applications Remmina and KRDC can be installed from Linux Mint's Software Manager application. Or you can search for the apt command online.

KRDC is a QT based GUI application, to use it, I have to change the protocol from VNC to RDP, then I need to specify the IP address of the old laptop. KRDC will also prompt the configuration for connection. One of the configurations is the screen resolution. I was able to change it to 1600x900 for display. Once I logged in, I also noticed the speed is not bad. The lagging is barely noticeable.

Installing this RDP client is easy through UI so I won't go over the step by step process. Ther might be another issue with fire wall blocking the port for XRDP server (port number 3389). It can be opened using the "ufw" command. The easiest way is to open the port to any one using the following command:

sudo ufw allow 3389

In order to be more security conscious, we can open the fire wall using ufw for specific IP address only, and block others. Here is the command:

sudo ufw allow from 192.168.1.0/24 to any port 3389

I believe the above command will allow IP addresses from 192.168.1.0 to 192.168.1.254 connect to the old laptop. For some reason, I didn't have to do this fire wall configuration. So I was all set. There are more advice of SSL tunneling to 3389 for increased security configuration. I didn't try them.

Summary

This is fun. But it took a while. What I have learned is that there are applications that are well designed and easy to work with. Then, there are apps that are just hard to work with. I am glad that I found a set of applications that can help me with remote desktop work I have to do. And I hope this guide can help others with their issues setting up remote desktop on Linux machines. Good luck.

Your Comment


Required
Required
Required

All Related Comments

Loading, please wait...
{{cmntForm.errorMsg}}
{{cmnt.guestName}} commented on {{cmnt.createDate}}.

There is no comments to this post/article.