[stordis-toc]
Introduction
Remote Desktop Protocol (RDP) allows you to access your Ubuntu system from another computer, making it easier to manage your system remotely. In this guide, we'll walk you through setting up RDP on Ubuntu 24.04 using xrdp.
Prerequisites
- A system running Ubuntu 24.04
- Sudo privileges
- A stable internet connection
Note
Remember to use desktop linux, or if you are using server linux you need to have some light interface installed e.g. XFCE. To do it just use commmand:
sudo apt install xfce4 -y
Step-By-Step Instruction
STEP 1: Update Your System
- Before installing any software, update your package list to ensure you get the latest versions.
sudo apt update && sudo apt upgrade -y
STEP 2: Install XRDP
- Ubuntu does not come with an RDP server by default, so we need to install xrdp.
sudo apt install xrdp -y
- Once installed, check the status of xrdp:
sudo systemctl status xrdp
- If it is not running, start it using:
sudo systemctl start xrdp
- Enable xrdp to start on boot:
sudo systemctl enable xrdp
STEP 3: Set default desktop environment for xrdp:
echo "xfce4-session" > ~/.xsession
- Restart xrdp:
sudo systemctl restart xrdp
STEP 4: Allow RDP Through the Firewall
- By default, XRDP listens on port 3389. You need to allow traffic through the firewall:
sudo ufw allow 3389/tcp sudo ufw reload
- Check if the firewall is active:
sudo ufw status
STEP 5: Create a New User for RDP Access
- Create the New User with a Home Directory and Bash Shell:
sudo useradd -m stordis --shell /bin/bash
- Set a Password for the New User:
sudo passwd stordis
- Grant Sudo Access to the New User (Optional):
sudo usermod -aG sudo stordis
STEP 6: Connect to Ubuntu Using RDP
- On your Windows or Linux machine, open Remote Desktop Connection.
- Enter the IP address of your Ubuntu machine.
- Click Connect.
- When prompted, enter username and password of user you created in previous step.
- You should now have remote access to your Ubuntu desktop.
STEP 7: Troubleshooting
- Authentication Failure: Ensure your user is part of the ssl-cert group:
sudo adduser xrdp ssl-cert sudo systemctl restart xrdp
If you encounter any issues, check the xrdp logs using:
sudo journalctl -u xrdp --no-pager | less
Congratulations!
You have successfully set up RDP on Ubuntu 24.04! You can now remotely access and manage your system efficiently.
Enjoy seamless remote desktop access to your Ubuntu machine!
If you want to explore more topics, be sure to check out our other guides, including:
How to install NTP server in Ubuntu 24.04
For more free resources, visit: https://stordis.com/free-resources/
Comments 0
Comments
Please sign in to leave a comment.