XRDP is a remote desktop service for the LINUX servers which allows us to connect remote Linux desktop systems over Microsoft RDP protocol. XRDP also supports two-way clipboard transfer (text, bitmap, file), audio redirection, and drive redirection (mount local client drives on the remote machines).
To install XRDP, run the following command in the terminal:
Command: apt install xrdp
After installing XRDP, enable the xrdp service by using the following systemctl command:
Command: systemctl enable –now xrdp
To connect with the RDP session you may need to allow the port in firewall which by default is closed. Run the below command to open the port.
Command: ufw enable
Command: sudo ufw allow from any to any port 3389 proto tcp
To test the connection using the Remote Desktop Connection client on Windows, first launch the Remote Desktop Connection app. Enter your remote server’s public IP and username into the fillable text boxes for Computer and User name.
You may need to press the down arrow for Show Options to input the username:
Press the Connect button. If you receive an alert that the Remote Desktop can’t connect to the remote computer, check that you have turned on the Remote Desktop option in your system settings.
Then, enter your remote server’s username and the password you created for user during the initial server setup. Press Ok.
Once you have logged in, you should be able to access your Ubuntu Desktop environment:
Furthemore, default xrdp does not allow root to perform remote desktop connection. So you should have a look at the following file /etc/xrdp/sesman.ini and check if there is any AllowRootLogin option.
Set the value to 1, true or yes to enable root login on terminal server as shown in below screenshot.
In this article, you configured xrdp to connect to a graphical desktop for your remote Ubuntu server over an RDP connection from a local machine.
You may also read:
- Find OS Version with 5 Different Methods in Windows PowerShell
- [Linux] MySQL: The Easy Way to Check Your Version
- How To Install Remmina in Ubuntu – A Remote Desktop Client
- Creating New Files and Directories Using Windows PowerShell New-Item CMDLET
- 18 Most Frequently Used Commands in Linux
- How to Install Apache Cassandra in Ubuntu
- Mount a Remote Filesystem over SSH with SSHFS
- How To Install and Configure Samba Server in Ubuntu
- Disable SMB3 Protocol With CMD and PowerShell in Windows 10
- [Linux] Scanning Open Ports With Netcat