You are on page 1of 17

27/03/2022 12:25 How to Install Xrdp on Ubuntu 20.

04

Home About eBooks Shop Donate Linux Online Courses Subscribe to Newsletter Linux Hosting A-Z
A-Z Linux
Linux Commands
Commands

Get Involved 

AD

Linux Distro’s  FAQ’s Programming  Linux Commands Linux Tricks Best Linux Tools Certifications  Guides 

Monitoring Tools  

Over 3,500,000+ Readers


How to Install Xrdp on Ubuntu 20.04
James Kiarie Last Updated: January 22, 2021 Ubuntu 18 Comments

AD

https://www.tecmint.com/install-xrdp-on-ubuntu/ 1/17
27/03/2022 12:25 How to Install Xrdp on Ubuntu 20.04

Xrdp is an open-source equivalent of Microsoft’s Remote Desktop Protocol (RDP). With xrdp installed
AD
on a Linux system, users can remotely access the Linux desktop using an RDP client as we shall
demonstrate later in this article. It’s completely free to download and use.

Without much further ado, let’s see how you can install Xrdp on Ubuntu Desktop 20.04 and 18.04.

Prerequisites

This guide assumes that you already have a copy of the Ubuntu 20.04 or Ubuntu 18.04 desktop
already installed. If you have a minimal installation – without a GUI – then installing a desktop
environment (such as GNOME) is recommended.

A Beginners Guide To Learn Linux


To install the Ubuntu desktop environment, run the command:
for Free [with Examples]

$ sudo apt install ubuntu-desktop

Step 1: Install Xrdp on Ubuntu 20.04


To start off, launch your terminal and invoke the following command to install Xrdp on your system.

$ sudo apt install xrdp

https://www.tecmint.com/install-xrdp-on-ubuntu/ 2/17
27/03/2022 12:25 How to Install Xrdp on Ubuntu 20.04

AD
AD

When prompted, just hit 'Y' and press enter to continue with the installation.

Install Xrdp on Ubuntu

Xrdp service starts automatically upon installation. You can verify this by running the command:

$ sudo systemctl status xrdp

Red Hat RHCSA/RHCE 8


Certification Study Guide
[eBooks]

https://www.tecmint.com/install-xrdp-on-ubuntu/ 3/17
27/03/2022 12:25 How to Install Xrdp on Ubuntu 20.04

Linux Foundation LFCS and LFCE


Certification Study Guide
[eBooks]

AD

Verify Xrdp Status on Ubuntu

The output confirms, without a doubt, that the xrdp daemon is active and running.

Step 2: Configure Xrdp on Ubuntu 20.04


When Xrdp is installed, an SSL certificate key – ssl-cert-snakeoil.key – is placed in the /etc/ssl/private/
folder. We need to add the xrdp user to the ssl-cert group to make the file readable to the user.

$ sudo adduser xrdp ssl-cert

Add Xrdp User to SSL Cert Group


https://www.tecmint.com/install-xrdp-on-ubuntu/ 4/17
27/03/2022 12:25 How to Install Xrdp on Ubuntu 20.04

Xrdp listens on port 3389 and if you are behind a UFW firewall, you need to open the port to allow
inbound traffic from an RDP client. In this example, I will allow traffic from my entire subnet to the Learn Linux Commands
Ubuntu system. and Tools

How to Manage ‘Systemd’


$ sudo ufw allow from 192.168.2.0/24 to any port 3389
Services and Units Using
‘Systemctl’ in Linux

Thereafter, reload the firewall and confirm if the port has been opened. How to Create a Disk Partitions in
Linux

How to Find Out Top Directories


$ sudo ufw reload

and Files (Disk Space) in Linux


$ sudo ufw status

Fast – Test Your Internet Download


Speed from Linux Terminal

Block SSH Server Attacks (Brute


Force Attacks) Using DenyHosts

How to Create and Use Alias


Command in Linux

Open Xrdp Port on Ubuntu Firewall

Step 3: Access Remote Ubuntu Desktop with RDP Client 

https://www.tecmint.com/install-xrdp-on-ubuntu/ 5/17
27/03/2022 12:25 How to Install Xrdp on Ubuntu 20.04

In this step, we are going to access the Ubuntu desktop system from Windows 10 using the Remote
Desktop Client. But before we do so, ensure that you first log out of Ubuntu 20.04. This because Xrdp
only supports one Xsession.

Next, launch your client and key in your remote system’s IP address, and click the ‘Connect’ button.

Connect Remote Ubuntu System with RDP

On the pop-up that requires you to verify the identity of your remote system, ignore the certificate errors
and click on the ‘Next’ button to proceed with the connection.

https://www.tecmint.com/install-xrdp-on-ubuntu/ 6/17
27/03/2022 12:25 How to Install Xrdp on Ubuntu 20.04

RedHat RHCSA and RHCE Certification Preparation Guide - Get This Book

Verify Identity of Remote Ubuntu System

On the Xrdp login page, provide your login credentials and click ‘Ok’.

If You Appreciate What We Do Here


On TecMint, You Should Consider:

https://www.tecmint.com/install-xrdp-on-ubuntu/ 7/17
27/03/2022 12:25 How to Install Xrdp on Ubuntu 20.04

Enter Ubuntu Login

NOTE: At this point, you might encounter a blank black screen, instead of an Ubuntu desktop
background. In fact, I personally encountered it and after some digging, I discovered a nifty workaround.

Fix Black Ubuntu Screen



The solution is quite simple. Head over to the remote system and edit the /etc/xrdp/startwm.sh script.
https://www.tecmint.com/install-xrdp-on-ubuntu/ 8/17
27/03/2022 12:25 How to Install Xrdp on Ubuntu 20.04

$ sudo vim /etc/xrdp/startwm.sh

Add these lines just before the lines that test & execute Xsession as shown in the screenshot below.

unset DBUS_SESSION_BUS_ADDRESS

unset XDG_RUNTIME_DIR

Fix Ubuntu Black Screen

Save the file and exit. Then restart the Xrdp service.

$ sudo systemctl restart xrdp

Next, reinitiate the connection. After the initial authentication, you will be required to authenticate again
as shown.

https://www.tecmint.com/install-xrdp-on-ubuntu/ 9/17
27/03/2022 12:25 How to Install Xrdp on Ubuntu 20.04

Ubuntu Login

Provide your credentials and click ‘Authenticate’ and finally, this ushers you to the desktop screen of
the remote Ubuntu desktop system as shown.

https://www.tecmint.com/install-xrdp-on-ubuntu/ 10/17
27/03/2022 12:25 How to Install Xrdp on Ubuntu 20.04

Remote Ubuntu Desktop Sharing

We’d love to hear your feedback and, more specifically, the challenges that you encountered. We hope
that this guide was useful.

 Linux Desktop Sharing , Remote Linux Desktop Tools , Ubuntu Tips

 5 Best Udemy Cisco Networking Courses in 2021 How to Install Wine 6.0 in Ubuntu 

If you liked this article, then do subscribe to email alerts for Linux tutorials. If you have any questions
or doubts? do ask for help in the comments section.

https://www.tecmint.com/install-xrdp-on-ubuntu/ 11/17
27/03/2022 12:25 How to Install Xrdp on Ubuntu 20.04

If You Appreciate What We Do Here On TecMint, You Should


Consider:

TecMint is the fastest growing and most trusted community site for any kind of
Linux Articles, Guides and Books on the web. Millions of people visit TecMint! to
search or browse the thousands of published articles available FREELY to all.

If you like what you are reading, please consider buying us a coffee ( or 2 ) as a
token of appreciation.

We are thankful for your never ending support.

Related Posts

https://www.tecmint.com/install-xrdp-on-ubuntu/ 12/17
27/03/2022 12:25 How to Install Xrdp on Ubuntu 20.04

How to Integrate Things To Do After Installing Useful GUI Tools to Free Up


ONLYOFFICE Docs with Jitsi Ubuntu 20.04/22.04 LTS Space on Ubuntu and Linux
on Ubuntu Mint

7 Ways to Speed Up Firefox Best Audio and Video How to Burn CD/DVD in
Browser in Linux Desktop Players for Gnome Desktop Linux Using Brasero

https://www.tecmint.com/install-xrdp-on-ubuntu/ 13/17
27/03/2022 12:25 How to Install Xrdp on Ubuntu 20.04

18 thoughts on “How to Install Xrdp on Ubuntu 20.04”


← Older Comments

lemon
November 13, 2021 at 6:01 am

When running the command to install it keeps asking for credentials again and again.

How to fix it??

Reply

DY
June 25, 2021 at 1:18 am

James, thanks for this post and the hours of my life you saved.

Reply

← Older Comments 

https://www.tecmint.com/install-xrdp-on-ubuntu/ 14/17
27/03/2022 12:25 How to Install Xrdp on Ubuntu 20.04

Got something to say? Join the discussion.


Have a question or suggestion? Please leave a comment to start the discussion. Please keep in mind
that all comments are moderated and your email address will NOT be published.

Name *

Email *

Save my name, email, and website in this browser for the next time I comment.

Notify me of followup comments via e-mail. You can also subscribe without commenting.

Post Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.

https://www.tecmint.com/install-xrdp-on-ubuntu/ 15/17
27/03/2022 12:25 How to Install Xrdp on Ubuntu 20.04

AD

Linux Server Monitoring Tools Learn Linux Tricks & Tips

5 Tools to Scan a Linux Server for Malware and Rootkits How to View Configuration Files Without Comments in Linux

How to Check Integrity of File and Directory Using “AIDE” in Linux Show a Custom Message to Users Before Linux Server Shutdown

Will ‘Htop’ Replace Default ‘Top’ Monitoring Tool in Linux? How to Use ‘cat’ and ‘tac’ Commands with Examples in Linux

How to Install Zabbix Monitoring Tool on Debian 11/10 fd – A Simple and Fast Alternative to Find Command

How to Install Zabbix on RHEL/CentOS and Debian/Ubuntu – Part 10 Practical Examples Using Wildcards to Match Filenames in Linux
1
10 Commands to Collect System and Hardware Info in Linux
Cockpit – A Powerful Tool to Monitor and Administer Multiple Linux
Servers via Browser

Best Linux Tools

The Top 5 Open-Source Microsoft 365 Alternatives for Linux

6 Best PDF Page Cropping Tools For Linux

The 8 Best Open Source Web Servers

Best Audio and Video Players for Gnome Desktop 

https://www.tecmint.com/install-xrdp-on-ubuntu/ 16/17
27/03/2022 12:25 How to Install Xrdp on Ubuntu 20.04

5 Linux Command Line Based Tools for Downloading Files and Browsing Websites

16 Best Web Browsers I Discovered for Linux in 2020

Donate to TecMint Contact Us Advertise on TecMint Linux Services Copyright Policy Privacy Policy Career Sponsored Post

Tecmint: Linux Howtos, Tutorials & Guides © 2022. All Rights Reserved.
The material in this site cannot be republished either online or offline, without our permission.

Hosting Sponsored by : Linode Cloud Hosting

https://www.tecmint.com/install-xrdp-on-ubuntu/ 17/17

You might also like