How To

Install Xrdp on Ubuntu 18.04: Remote Desktop Setup Guide

Xrdp is an open-source implementation of the Microsoft Remote Desktop Protocol (RDP). It lets you access your Ubuntu desktop remotely from a Windows, macOS, or Linux machine using any RDP-compatible client.

This guide shows you how to install Xrdp on Ubuntu 18.04 and connect to it using a Remote Desktop client.

<strong>Prerequisite:</strong>&nbsp;You need a sudo account and a desktop environment installed on your Ubuntu machine.

Install a Desktop Environment

Xrdp requires a graphical desktop environment. If your Ubuntu server does not have one, install Xfce, which is lightweight and works well with Xrdp:

bashsudo apt updatesudo apt install xfce4 xfce4-goodies xorg dbus-x11 x11-xserver-utils

Install Xrdp on Ubuntu

Install Xrdp from the default Ubuntu repositories:

bashsudo apt install xrdp

After the install, the Xrdp service starts automatically. Verify it is running:

bashsudo systemctl status xrdp

Xrdp uses a self-signed SSL certificate located at /etc/ssl/private/ssl-cert-snakeoil.key. Add the xrdp user to the ssl-cert group so it can read the certificate:

bashsudo adduser xrdp ssl-cert

Restart the Xrdp service to apply the change:

bashsudo systemctl restart xrdp

Configure the Desktop Session

Tell Xrdp to use Xfce as the session type. Create or edit the .xsession file in your home directory:

bashecho xfce4-session &gt; ~/.xsession

Open the Firewall Port

If UFW is enabled, allow RDP traffic on port 3389:

bashsudo ufw allow 3389

Connect with a Remote Desktop Client

On Windows, open the built-in Remote Desktop Connection app. Enter the IP address of your Ubuntu machine and click Connect. Use your Ubuntu username and password to log in.

On macOS, install the Microsoft Remote Desktop app from the App Store, add a new connection with your Ubuntu IP address, and connect.

On Linux, use a client like Remmina and select RDP as the protocol.

Xrdp is now installed and running on your Ubuntu 18.04 machine. You can access the full desktop environment from any device that supports RDP. Got questions? Leave a comment below.

Cyber Defence

Recent Posts

Install VirtualBox on Ubuntu 18.04 from the Oracle Repository

VirtualBox is a free, open-source, cross-platform virtualization application maintained by Oracle. It lets you run multiple…

10 hours ago

Install PostgreSQL on Ubuntu 18.04 with Remote Access Setup

PostgreSQL (also called Postgres) is a free, open-source, object-relational database management system with a strong reputation…

10 hours ago

Install VMware on Ubuntu 18.04: Workstation Player Setup Guide

VMware Workstation Player is a mature, stable virtualization platform that lets you run multiple isolated operating…

10 hours ago

Set Up a UFW Firewall on Ubuntu 18.04: Allow, Deny, and Manage

A properly configured firewall is one of the most important layers of security for any internet-facing server. UFW (Uncomplicated Firewall) is a user-friendly front-end for managing iptables rules that ships pre-installed on Ubuntu. Its defaults are sensible: block all incoming connections, allow all outgoing connections. No outside traffic reaches your server unless you explicitly open a port. This guide covers how to configure a UFW firewall on Ubuntu 18.04, from setting default policies and application profiles to writing allow and deny rules for specific ports, IPs, and subnets. <strong>Prerequisite:</strong>&nbsp;You&nbsp;need&nbsp;sudo&nbsp;access. Configure UFW Firewall on Ubuntu: Defaults, SSH, and Application Profiles If UFW is not installed, add it with: bashsudo…

10 hours ago

Disable UFW Firewall on Ubuntu 18.04: Stop, Reset, and Re-enable

UFW (Uncomplicated Firewall) is a user-friendly front-end for managing iptables rules on Ubuntu. It ships pre-installed…

10 hours ago

Install Apache Cassandra on Ubuntu 18.04: NoSQL Setup Guide

Apache Cassandra is a free, open-source NoSQL database designed for high availability and linear scalability with…

1 day ago