Skip to content

Techeons

Imagine | Explore | Innovate

Menu
  • Home
Menu

How to setup RDP (Remote Desktop Protocol) using xrdp on Ubuntu

Posted on October 1, 2024

RDP is a proprietary protocol developed by Microsoft that allows users to remotely connect to and control a Windows-based computer or server.

xrdp is an open-source implementation of Microsoft’s Remote Desktop Protocol (RDP), allowing users to remotely connect to Linux systems.

Key Features:

  1. Remote Access: Connect to remote Windows computers or servers.
  2. Graphical Interface: Access remote desktops with a graphical interface.
  3. Keyboard and Mouse Control: Control remote computers as if sitting in front of them.
  4. File Transfer: Transfer files between local and remote computers.
  5. Encryption: Supports encryption for secure connections (TLS/SSL).

RDP Components:

  1. RDP Client (Remote Desktop Connection): Software used to connect to remote computers.
  2. RDP Server (Remote Desktop Services): Software that allows remote connections.

Common Use Cases:

  1. Remote Work
  2. Server Administration
  3. Technical Support
  4. Virtual Desktop Infrastructure (VDI)

Installation

1) Install the desktop environment

xfce is a lightweight, open-source desktop environment for Linux and other Unix-like operating systems.

sudo apt update
sudo apt install xfce4 xfce4-goodies -y

2) Install xrdp

sudo apt install xrdp -y

3) Check the status

sudo systemctl status xrdp

If it is not running, you can start it using this command:

sudo systemctl start xrdp

4) Create .xsession file

echo "xfce4-session" | tee .xsession

This configuration tells the system to use xfce’s session manager when a graphical login is requested. Since XFCE is your chosen desktop environment, xfce4-session acts as its default session manager.

Without this configuration, no session manager is selected, causing the RDP session to fail when attempting to connect to the graphical display.

5) Restart the service

sudo systemctl restart xrdp

6) Configure the firewall to allow the connection

If you have not setup the firewall yet, check this article: How to setup a firewall in Ubuntu using UFW

Default port for RDP is 3389.

sudo ufw allow 3389
sudo ufw status

7) Test the RDP connection

Now open Remote Desktop Connection on your Windows machine and login to the Ubuntu machine.

Share on Social Media
x facebook pinterest linkedin tumblr reddit emailwhatsapptelegrammastodon

Leave a Reply Cancel reply

You must be logged in to post a comment.

Recent Posts

  • Nginx: How to increase timeout for Nginx
  • Cheat Sheet: Essential Git Commands
  • Setting a default shell in Linux
  • Setting up Composer on Linux
  • Switch easily between Python versions on a Mac using pyenv

Tags

ai alerting aws b2 backblaze certificate cheatsheet cloud commands data-science datalake devops dns docker dremio git gitlab infra jenkins kubernetes linux metabase minikube minio monitoring mount mysql nginx nodejs notebooks openssh php python scala secrets spark ssh ssl ubuntu ufw usb web dev tools windows xampp zeppelin

©2026 Techeons | Design: Newspaperly WordPress Theme