Technical News and Knowledge Base Articles along with How to Step by Step Guides for SMB and Enterprise

Setting Up Remote Desktop on Ubuntu 24.04

Remote Desktop allows you to connect and control your Ubuntu 24.04 machine from another device. This guide covers setting up Remote Desktop using built-in or open-source tools available in the official Ubuntu 24.04 repositories, along with additional configuration, optimization tips, and an explanation of how Remote Desktop works.

Step-by-Step Instructions Using GUI Tools

  1. Install the Required Packages:
  • First, ensure your system is up-to-date and install the necessary packages.
    bash sudo apt update sudo apt upgrade sudo apt install gnome-remote-desktop
  1. Enable Remote Desktop:
  • Open Settings from the Applications menu.
  • Navigate to Sharing.
  • Toggle the switch to enable Sharing.
  • Click on Remote Desktop.
  • Toggle the switch to enable Remote Desktop.
  • Set up your preferences for authentication (e.g., password or confirmation for each connection).
  1. Configure Firewall:
  • Ensure the firewall allows remote desktop connections.
    bash sudo ufw allow 3389/tcp sudo ufw enable

Step-by-Step Instructions Using the Terminal

  1. Install xRDP:
  • xRDP is an open-source implementation of the Microsoft Remote Desktop Protocol (RDP) that allows you to control a remote system graphically.
    bash sudo apt install xrdp
  1. Enable xRDP Service:
  • Start the xRDP service and enable it to start at boot.
    bash sudo systemctl enable xrdp sudo systemctl start xrdp
  1. Configure xRDP:
  • Ensure the default desktop environment is set correctly for xRDP.
    bash echo "gnome-session" > ~/.xsession
  1. Add xRDP User to ssl-cert Group:
  • Add the xRDP user to the ssl-cert group for access to the key files.
    bash sudo adduser xrdp ssl-cert

Ports Used

Remote Desktop using xRDP typically uses TCP port 3389. Ensure this port is open in your firewall settings.

Additional Configuration Settings

  1. Static IP:
  • Assign a static IP to your Ubuntu machine for a more reliable connection. Configure this in your network settings or router.
  1. Security Settings:
  • Configure xRDP to use encryption by editing the /etc/xrdp/xrdp.ini file and setting crypt_level to high.
  1. Customizing Session:
  • You can customize the session by editing the .xsession file in your home directory to specify different desktop environments or session settings.

Optimizing the Connection

  1. Reduce Bandwidth Usage:
  • Use a lower resolution and color depth for the remote session to improve performance.
    • Open Settings > Display and adjust the resolution.
    • In your RDP client, choose a lower color depth.
  1. Use a Wired Connection:
  • For better stability and speed, prefer a wired Ethernet connection over Wi-Fi.

How Remote Desktop Works

Remote Desktop Protocol (RDP) and VNC (Virtual Network Computing) are commonly used protocols to transmit screen updates, keyboard, and mouse inputs over the network.

  1. User Input:
  • Keyboard and mouse inputs are captured and sent from the client to the server.
  1. Screen Updates:
  • The server processes the inputs, updates the screen, and sends the changes back to the client.
  1. Compression and Encryption:
  • Data is compressed and encrypted to ensure efficient and secure transmission.

Tips and Tricks

  1. Wake on LAN:
  • Configure Wake on LAN (WoL) to wake your Ubuntu machine remotely if it’s in sleep mode.
  1. Use SSH Tunneling:
  • Secure your remote desktop session by creating an SSH tunnel.
    bash ssh -L 3389:localhost:3389 user@remote_host
  • Connect your RDP client to localhost:3389 after setting up the tunnel.
  1. Install and Use Remmina:
  • Remmina is a versatile remote desktop client that supports multiple protocols (RDP, VNC, SSH).
    bash sudo apt install remmina remmina-plugin-rdp remmina-plugin-vnc
  • Launch Remmina from the Applications menu and configure your connections.
  1. Automatic Start of xRDP:
  • Ensure xRDP starts automatically with the system:
    bash sudo systemctl enable xrdp


Setting up Remote Desktop on Ubuntu 24.04 is straightforward with both GUI and terminal-based methods. Using built-in or open-source tools ensures compatibility and flexibility in managing remote sessions on your Ubuntu machine.

Agents AI Agents Android Antivirus Apple iOS Artificial Intelligence Audio Browsers Cisco CiscoIOS Cybersecurity Docker FreeBSD Linux LLMs LMStudio MacOS Mobile Networking News OpenDevin Operating Systems Programming Python Reinstall Remote Desktop Reset SSH Support Tools Ubuntu Ubuntu 24.04 Web Windows Windows 11