How To Install Xrdp Server On Ubuntu 14.04 Unity

Looking to Install XRDP on Ubuntu 22.04? Check out our new guide here.

The xRDP Linux client is a popular way to get a remote desktop session to your Linux Server. However, some users may not want to use tools like Xsession to pull graphical applications directly from the command line. The procedure will explain how to install and configure xRDP, so you’re not stuck with a black screen when connecting.

xrdp provides a graphical login to remote machines using Microsoft Remote Desktop Protocol (RDP). xrdp accepts connections from various RDP clients: FreeRDP, rdesktop, Neutri, noRDP, and Microsoft Remote Desktop Client (for Windows, Mac OS, iOS, and Android).

RDP transport is encrypted using TLS by default.

xRDP Features

You get several cool features when you install xRDP; you can connect to any Linux computer from anywhere and reconnect to a pre-existing session; this is surprisingly difficult to do in Linux because of how the kernel handles user sessions.

You can transfer files, clipboard content, and audio between the host and the guest. All you need is port 3389 open, and you are good to go.

How to install the xRDP server

On Ubuntu-based Linux distributions, xRDP is now included in the default repos; all you need to do is type:

ShellScript
sudo apt install xrdp -y

If you use Redhat or Centos, you first need to enable EPEL packages before installing:

ShellScript
sudo yum install epel-release -y

ShellScript
sudo yum install xrdp -y

On Red Hat and CentOS version 8, replace yum in dnf

Once installed, you will have the following directory structure:

ShellScript
xrdp
โ”œโ”€โ”€ common ยทยทยทยทยทยท common code
โ”œโ”€โ”€ docs ยทยทยทยทยทยทยทยท documentation
โ”œโ”€โ”€ fontdump ยทยทยทยท font dump for Windows
โ”œโ”€โ”€ genkeymap ยทยทยท keymap generator
โ”œโ”€โ”€ instfiles ยทยทยท installable data file
โ”œโ”€โ”€ keygen ยทยทยทยทยทยท xrdp RSA key pair generator
โ”œโ”€โ”€ libpainter ยทยท painter library
โ”œโ”€โ”€ librfxcodec ยท RFX codec library
โ”œโ”€โ”€ libxrdp ยทยทยทยทยท core RDP protocol implementation
โ”œโ”€โ”€ m4 ยทยทยทยทยทยทยทยทยทยท Autoconf macros
โ”œโ”€โ”€ mc ยทยทยทยทยทยทยทยทยทยท media center module
โ”œโ”€โ”€ neutrinordp ยท RDP client module for proxying RDP connections using NeutrinoRDP
โ”œโ”€โ”€ pkgconfig ยทยทยท pkg-config configuration
โ”œโ”€โ”€ sesman ยทยทยทยทยทยท session manager for xrdp
โ”œโ”€โ”€ tcutils ยทยทยทยทยท QT based utility program for thin clients
โ”œโ”€โ”€ tests ยทยทยทยทยทยทยท tests for the code
โ”œโ”€โ”€ vnc ยทยทยทยทยทยทยทยทยท VNC client module for xrdp
โ”œโ”€โ”€ vrplayer ยทยทยทยท QT player redirecting video/audio to clients over xrdpvr channel
โ”œโ”€โ”€ xrdp ยทยทยทยทยทยทยทยท main server code
โ”œโ”€โ”€ xrdpapi ยทยทยทยทยท virtual channel API
โ”œโ”€โ”€ xrdpvr ยทยทยทยทยทยท API for playing media over RDP
โ””โ”€โ”€ xup ยทยทยทยทยทยทยทยทยท X11rdp and xorgxrdp client module

Credit: https://github.com/neutrinolabs/xrdp

Troubleshooting Older versions of Ubuntu / Red Hat

This is a summary of a support job I did for a customer.

Scenario: The customer was stuck using Ubuntu 14 for a production database with two users worldwide. They would get a black screen or a blank session each time they logged in.

Project details: xRDP Ubuntu is Remote Desktop Protocol (RDP) client for Ubuntu, the Unity desktop for Ubuntu 14.04 is now obsolete and is being replaced by GNOME. GNOME is available in versions 15 and above. Unity has been used in Ubuntu for approx. 2012.

Unity was dropped as it has several compatibility issues with Ubuntu plugins, including problems with authenticating an x RDP Connection. xRDP can be configured to listen on port 3389 (Remote Desktop Protocol (RDP) just like the Microsoft Windows remote desktop protocol.

You will need the following:

  • SSH terminal access to the server
  • Sudo root access

Step 1 – Confirm which version of Linux you are running

Make an SSH connection to the Ubuntu Server Putty or your favorite terminal.

Confirm the version of Ubuntu that is running by typing:

ShellScript
lsb_release -a

Confirm the version of the Ubuntu desktop that is running by typing:

ShellScript
dpkg -l|grep unity

Or, if you are not sure which version you are running, type the following:

ShellScript
dpkg -l|egrep -i "(kde|gnome|lxde|xfce|mint|unity|fluxbox|openbox)" | grep -v library

Step 2 – Installing xRDP on Ubuntu 14.04

The next step is to install the xRDP client onto Ubuntu. Open a terminal session and type:

ShellScript
sudo apt-get install xrdp -y

The installation will only take a few seconds to complete; make a note of these important file locations:

ShellScript
${XRDP_BIN_DIR}/xrdp
${XRDP_CFG_DIR}/xrdp.ini
${XRDP_LOG_DIR}/xrdp.log
${XRDP_PID_DIR}/xrdp.pid

Step 3 – Install alternative Desktop Environment (XFCE)

Open terminal and type:

ShellScript
sudo apt-get update -y
sudo apt-get install xfce4 -y

Step 4 – Configure xRDP to use XFCE

This will force xRDP to use the XFCE desktop instead of the packaged UNITY desktop.

This change will only affect the xRDP desktop experience. You will see a different wallpaper on the AWS console but the same Unity server.

This change is persistent and will remain in place if the server reboots

ShellScript
echo xfce4-session ~/.xsession
sudo service xrdp restart

Step 5 – Access Ubuntu with RDP

Make sure you have the Ubuntu server hostname or IP address to hand. To get this, you can type

On the console, type:

ShellScript
hostname -I
ip addr show

From your Windows Desktop Machine or local desktop, Open Remote Desktop Connection. You can order mstsc from the command line or the start menu

ShellScript
mstsc

You will be prompted to connect to the server vis xRDP

A connection log will pop up. This will tell you the process of the XDRP login and any errors you may have. The most common mistake is password failure.

xRDP Connection log connected

Step 6 – Configure console/admin sessions on xRDP

**IMPORTANT**

Every time you log into an xRDP session the server will create you a new logon session ID. This can be frustrating if you are disconnected, the server will, by default, connect you to a new session. To allow true admin or console xRDP access you need to do the following.

Edit the xrdp.ini

Elsewhere On TurboGeek:  Installing Glances on Red Hat Enterprise Linux (RHEL) and Compatible Distributions

ShellScript
sudo gedit /etc/xrdp/xrdp.ini

Edit lines

Port =-1 change to port=ask-1

xRDP port configuration for console access

Restart the xRDP service

ShellScript
sudo service xrdp restart

or

sudo systemctl restart xrdp

You can check the status of the service with

ShellScript
sudo systemctl status xrdp

Please Note that If you are connected via xRDP, you will be disconnected

Open the Remote desktop and reconnect to the server.

On the connection log, make a note of the port highlighted below. In my example, it’s 5914; it will most likely differ on your AWS config.

xRDP Session Logon Screen

Disconnect from that session.

Now, reopen the Remote desktop and connect to xRDP

xRDP Session Logon Screen

This time enter the port number when connecting.

You will now be able to log straight back into any saved work.

How will it look from the Ubuntu console?

Login in screen wallpaper will change, but it will still be Unity underneath:

xRDP Logon Screen running on Ubuntu Unity

Post log in on the console

xRDP logged on session

That’s it. You now know how to install xRDP on Ubuntu 14.04. Did you know you can also install it on a newer version of Ubuntu? Check out our new guide here.

Thanks for taking the time to read this article. if you have any questions or feedback, please write in the comment section below.

Richard.Bailey

Richard Bailey, a seasoned tech enthusiast, combines a passion for innovation with a knack for simplifying complex concepts. With over a decade in the industry, he's pioneered transformative solutions, blending creativity with technical prowess. An avid writer, Richard's articles resonate with readers, offering insightful perspectives that bridge the gap between technology and everyday life. His commitment to excellence and tireless pursuit of knowledge continues to inspire and shape the tech landscape.

You may also like...

1 Response

  1. 23/01/2024

    […] of the very first blogs I wrote for turbogeek.co.uk was how to Install XRDP on Ubuntu 14.04. Fast forward over 6 years, and a lot has changed in the world of XRDP, not to mention we are now 9 […]

Leave a Reply

Your email address will not be published. Required fields are marked *

Translate ยป