How to set up an xRDP server on Ubuntu 18.04

Vivek Teega
Aug 6, 2018 · 2 min read

Most of the tutorials on setting up an xRDP server are based on the older versions. This tutorial definitely works on Ubuntu 18.04

I am using XFCE as my desktop environment as its light on resources and I don’t always have a good internet connection when working remotely. You can choose another environment of your choice, like MATE.

Note — xRDP has problems working with Unity and GNOME desktop environment.

Step 0- Connecting to the remote server

vivek@Teega:~$ ssh username@remoteServerIP 
username@remoteServerIP's password: *****

Step 1- Install xRDP

sudo apt-get update
sudo apt-get install xrdp

Step 2- Install your preferred desktop environment

# XFCEsudo apt-get install xfce4
#Optional stuff
sudo apt-get install xfce4-terminal
sudo apt-get install gnome-icon-theme-full tango-icon-theme

or

# MATEsudo apt-get install mate-core mate-desktop-environment mate-notification-daemon

Step 3- Tell xRDP to use your environment

# XFCEsudo sed -i.bak '/fi/a #xrdp multiple users configuration \n xfce-session \n' /etc/xrdp/startwm.sh

or

# MATEsudo sed -i.bak '/fi/a #xrdp multiple users configuration \n mate-session \n' /etc/xrdp/startwm.sh

Step 4- Firewall permission

# allow just RDP through the local firewall
sudo ufw allow 3389/tcp
# restart xrdp
sudo /etc/init.d/xrdp restart

You should be able to connect now. I use Remmina to connect from my laptop running Ubuntu. Windows users have an RDP connection application by default on their machines. To find it search for “Remote Desktop Connection” from the start menu.

Image for post
Login page looks like the above

When you log in with XFCE for the first time, the system will ask if you want default panel settings or an empty panel. Choose the default settings unless you know what you want.

References


Questions? Comments? Suggestions? Leave a comment here or hit me up at vivek.teega@gmail.com. I work as a developer with Ranchi Mall.

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch

Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore

Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store