...
Installing and configuring xrdp on ubuntu vps for remote desktop connections
Follow this step-by-step guide for installing and configuring xrdp on ubuntu vps for remote desktop connections.

This article provides a step-by-step guide for installing and configuring XRDP on Ubuntu VPS for Remote Desktop connections.

What is XRDP?

XRDP is an open-source Remote Desktop Protocol (RDP) server for Linux and other Unix-like systems.

It allows you to connect to a Linux server using Microsoft’s Remote Desktop Protocol — the same protocol used by Windows Remote Desktop.

What XRDP Does

  • Enables remote graphical desktop access to a Linux machine
  • Lets you connect using:
  • Windows Remote Desktop Connection (mstsc)
  • macOS RDP clients
  • Linux RDP clients
  • Supports common desktop environments like:
  • XFCE
  • GNOME
  • KDE Plasma
  • MATE

How It Works

XRDP acts as an RDP server and bridges RDP sessions to an X11 desktop session on the Linux system.

Typical flow:

Remote Client (Windows/macOS/Linux)
        ↓ RDP
        ↓
XRDP Service (port 3389)
        ↓
Xorg / Xvnc session
        ↓
Linux Desktop Environment

Default Port

  • TCP 3389 (same as Windows RDP)

Common Use Cases

  • Accessing a VPS with GUI
  • Managing a remote Linux workstation
  • Providing remote desktop access to users
  • Lab / development environments
  • Replacing VNC with RDP (better Windows compatibility)

XRDP vs VNC

Feature XRDP VNC
Protocol RDP VNC
Windows Native Client Yes No
Encryption Yes (TLS support) Usually weaker unless tunneled
Performance Generally better over WAN Can be slower

When to Use XRDP

XRDP is ideal when:

  • You want native Windows RDP compatibility
  • You’re managing Linux servers for Windows users
  • You need a lightweight GUI on a VPS

Installing and Configuring XRDP on Ubuntu VPS for Remote Desktop Connections

This guide will walk you through installing and configuring XRDP on your Ubuntu VPS, enabling you to access your server from a graphical interface, similar to a local desktop session.

Prerequisites

Before proceeding, ensure you have:

Launch ubuntu vps from $2. 49/mo!
The steps required for installing and configuring XRDP on Ubuntu VPS for Remote Desktop connections are as follows:

  1. Update Your Ubuntu VPS

    First, login to your VPS as root user, then update your package list and upgrade all your installed packages to their latest versions to ensure a smooth installation:

    sudo apt update && sudo apt upgrade -y
    
  2. Install XRDP on Ubuntu

    1. Install XRDP:
      sudo apt install xrdp -y
      
    2. Once installed, the XRDP service will start automatically. To verify, use:
      sudo systemctl status xrdp
      
    3. Enable XRDP to start on boot:
      sudo systemctl enable xrdp
      
  3. Configure XRDP

    1. Configure the XRDP session:
      For a better desktop experience, you can install a desktop environment. XFCE is a lightweight option:

      sudo apt install xfce4 xfce4-goodies -y
      
    2. Configure XRDP to use XFCE:
      echo xfce4-session > ~/.xsession
      
    3. Restart the XRDP service:
      sudo systemctl restart xrdp
      
  4. Connect to Your Ubuntu VPS from a Remote Desktop

    • From Windows:
      1. Launch Remote Desktop Connection.
      2. Enter your VPS’s IP address and click Connect.
      3. When prompted, enter your Ubuntu username and password.
    • From macOS:
      1. Install the Microsoft Remote Desktop app from the App Store.
      2. Open the app and click Add Desktop.
      3. Enter your VPS’s IP address and add your user credentials.
    • From Linux:
      1. You can use Remmina or another RDP client.
      2. Enter your VPS’s IP address and connect using your credentials.

Troubleshooting Common Issues

  • If you cannot connect, ensure the XRDP service is running and your firewall is configured to allow RDP connections (default port 3389).
  • For display issues, verify the .xsession file is correctly configured with your chosen desktop environment.

Launch ubuntu vps from $2. 49/mo!

Conclusion

You’ve now successfully installed and configured XRDP on Ubuntu VPS, enabling remote desktop access. This setup enhances your ability to manage your server remotely with a graphical interface, streamlining tasks and administration. Explore XRDP’s advanced configurations and desktop environments to tailor your remote desktop experience further.

This guide ensures you have a clear path to setting up XRDP on Ubuntu VPS, providing a foundation for remote management and efficiency improvements.

Avatar of editorial staff

Editorial Staff

Rad Web Hosting is a leading provider of web hosting, Cloud VPS, and Dedicated Servers in Dallas, TX.
lg